Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
is the fancy callout arrow next to your avatar...
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 31, 2012 - 7:49 pm

just the pointer/arrow part?  you will see here that the content, including the pointer/arrow is colored differently for the author...

Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Nov 1, 2012 - 9:11 am

Mr Papa said
just the pointer/arrow part?

Right. I noticed after I first posted that my arrow changed color to match the yellow background of my post.

thread-arrow-authorCurUser.gif vs. thread-arrow-author.gif for all other posts

I am curious about how to call a different image like that for even and odd posts since we alternate background colors for every other post. Brandon provided great instructions for calling one image in the template file, but I can't figure out how to display a different one depending on the post count (even or odd).

I hope this is clear. Thanks!

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Nov 1, 2012 - 9:58 am

Since Brandon did all that for us, will let him answer. Of course, apply even or odd classes to those rows so it's just css based on the row class.

Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Nov 1, 2012 - 10:17 am

Thanks again, I'm happy to wait for Brandon's direction since I'm not sure how to call a different image via CSS and his instructions only detail how the one image is being displayed:

echo '<img alt="" class="spAuthorArrow" src="'.SPTHEMEICONSURL.'thread-arrow-author.gif">';

I figured it must be done here via CSS, or the template file edit must require some sort of conditional argument for which image to show. Now I am really curious...

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
Nov 1, 2012 - 12:09 pm

What we do here is have a different post content background color shown to the user that made the post that only he sees. That's why you didn't see it until you saw your own post.

The way we do it is check to see if the post is one the user created and if so echo out a different arrow in the foreground and then use CSS to postion it and change the background of the post.

Here is the code in spTopicView.php just above the sp_PostIndexContent() function.

# Choose/ display Arrow For Users Post
$UserArrow = 'thread-arrow-author';
if ($spThisPost->user_id == $spThisUser->ID) $UserArrow = $UserArrow.'CurUser';            
$UserArrow = $UserArrow.'.gif';
sp_SectionStart('tagClass=spPostContentSection', 'content');
echo '<img alt="" class="spAuthorArrow" src="'.SPTHEMEICONSURL.$UserArrow.'">';

sp_PostIndexContent('', 'Awaiting Moderation');

 

What it basically does is change the filename of the echo'd image if the post is made by the user.  So if not made by user it's thread-arrow-author.gif and if made by user then we add CurUser to the filename and it becomes thread-arrow-authorCurUser.gif.

We use the same CSS class for both arrows to position it.

#spMainContainer .spAuthorArrow

Then change the background color of the content by using

#spMainContainer .spTopicPostContainer .spCurUserPost .spPostSection

What would have to be done for odd/even is a check to see which one it is then echo out the correct arrow. You wouldn't have to change the content background color CSS but would have to add CSS to position it.

I would need to take a look to see what the best way is to check if odd/even but can't do so right now I will look this evening.

Avatar
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
Nov 1, 2012 - 7:28 pm

Following up on this.

I would make 2 arrows. Naming them thread-arrow-author_spOdd.gif and thread-arrow-author_spEven.gif

Put them in your themes /images folder.

Then add this to TopicView.php

# Choose/ display Arrow For Users Post
$rowType = ($spTopicView->currentPost % 2) ? 'spOdd' : 'spEven';
$UserArrow = 'thread-arrow-author_' .$rowType.'.gif';
sp_SectionStart('tagClass=spPostContentSection', 'content');
echo '<img alt="" class="spAuthorArrow" src="'.SPTHEMEICONSURL.$UserArrow.'">';

(The code isp_SectionStart('tagClass=spPostContentSection', 'content'); is already in the file)

That will echo out foreground display of the arrow and then you can position it using the CSS tips earlier in this topic.

Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Nov 2, 2012 - 8:09 am

Excellent, thank you Brandon. This likes like it certainly should do the trick.

I'm at a conference all weekend but will report back with a link to the final results or any more questions.

Thanks again!

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Nov 2, 2012 - 8:12 am

please do...

Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Nov 6, 2012 - 12:33 pm

Beautiful... this kinda stuff is just magic to me.

http://tripawds.net/forums/tec.....-see-here/

We'll be implementing this on our live site shortly, just modifying our customized theme to be current with the latest release.

Thanks again!

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 6, 2012 - 1:30 pm

You're welcome. Looks good!

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625