Support Forum
just the pointer/arrow part? you will see here that the content, including the pointer/arrow is colored differently for the author...
Visit Cruise Talk Central and Mr Papa's World
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!
Simple: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.
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.
Visit Cruise Talk Central and Mr Papa's World
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...
Simple: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.
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.
$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.
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.
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!
Simple: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.
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!
Simple: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.
1 Guest(s)