we_clearblue

Add "View first unread post" button - we_clearblue

Add "View first unread post" button

by agafed » Sun Sep 25, 2011 5:19 am

I will like to know how to add the button tha redirects users to their "First unread post".

Is this button:



Example.jpg
Example.jpg (10.82 KiB) Viewed 963 times




Thanks...
agafed
Registered User
Posts: 101
Joined: Fri Sep 16, 2011 3:36 am
Contact:

Re: Add "View first unread post" button

by weeb » Sun Sep 25, 2011 5:06 pm

The last topic button works now like that if there are unread posts in the topic.
phpBB styles: we_universalwe_clearblue
Styles news and updates: FacebookGoogle+Twitter
weeb
Registered User
Posts: 392
Joined: Fri Apr 09, 2010 7:54 pm
Contact:

Re: Add "View first unread post" button

by agafed » Tue Sep 27, 2011 3:04 am

Dziękuję once again!! :)
agafed
Registered User
Posts: 101
Joined: Fri Sep 16, 2011 3:36 am
Contact:

Re: Add "View first unread post" button

by agafed » Tue Sep 27, 2011 9:21 pm

Hi... sorry, me again!

Yesterday I thought it worked because I test it with a topic which had only one new post, so the "last topic button" did its work. But today I test it in other topics and it always send me to the last post message.

Is there a way to add the button?? I think it may solve this...

I check on

Code: Select all

styles/we_clearblue/imageset/


And there is the icon_topic_newest image.

Thanks...
agafed
Registered User
Posts: 101
Joined: Fri Sep 16, 2011 3:36 am
Contact:

Re: Add "View first unread post" button

by weeb » Wed Sep 28, 2011 3:23 pm

Ok, you must probably be using older version. Here is the solution.

To add the icon you want, open styles/we_clearblue/template/viewforum.html and find:

Code: Select all

<!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG}<!-- ENDIF --> <a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>

Add in-line before:

Code: Select all

<!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->

Now refresh style components. That's all :)
phpBB styles: we_universalwe_clearblue
Styles news and updates: FacebookGoogle+Twitter
weeb
Registered User
Posts: 392
Joined: Fri Apr 09, 2010 7:54 pm
Contact:

Re: Add "View first unread post" button

by agafed » Thu Sep 29, 2011 1:45 am

Thanks Mr. Weeb.

I edit the viewforum.html file, but the image still not appear.

And then, I can't find what you said in the other post:

weeb wrote:It's probably a bug fixed in upcoming we_* styles update. Open viewtopic_body.html, find:

Code: Select all

<!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a><!-- ENDIF -->

Replace it with:

Code: Select all

<!-- IF not S_IS_BOT --><a href="<!-- IF topicrow.S_UNREAD_TOPIC -->{topicrow.U_NEWEST_POST}<!-- ELSE -->{topicrow.U_LAST_POST}<!-- ENDIF -->">{LAST_POST_IMG}</a><!-- ENDIF -->

This would help.


Can't find any of those things. There's no even the word "last" in that file. :(

Thanks!
agafed
Registered User
Posts: 101
Joined: Fri Sep 16, 2011 3:36 am
Contact:

Re: Add "View first unread post" button

by weeb » Thu Sep 29, 2011 7:04 pm

I wrote the post too fast. In both cases it has to be viewforum_body.html.
phpBB styles: we_universalwe_clearblue
Styles news and updates: FacebookGoogle+Twitter
weeb
Registered User
Posts: 392
Joined: Fri Apr 09, 2010 7:54 pm
Contact:

Re: Add "View first unread post" button

by agafed » Fri Sep 30, 2011 8:16 pm

Hi again...

I add the icon... but still doesn't appear. I refreshed the style and cleaned the cache, but nothing.

And I can't find this code:


weeb wrote:It's probably a bug fixed in upcoming we_* styles update. Open viewtopic_body.html, find:

Code: Select all

<!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a><!-- ENDIF -->

Replace it with:

Code: Select all

<!-- IF not S_IS_BOT --><a href="<!-- IF topicrow.S_UNREAD_TOPIC -->{topicrow.U_NEWEST_POST}<!-- ELSE -->{topicrow.U_LAST_POST}<!-- ENDIF -->">{LAST_POST_IMG}</a><!-- ENDIF -->

This would help.



It's not in viewtopic_body.html nor viewforum_body.html

Thanks...
agafed
Registered User
Posts: 101
Joined: Fri Sep 16, 2011 3:36 am
Contact:

Re: Add "View first unread post" button

by weeb » Tue Oct 04, 2011 8:03 am

Which version of we_clearblue do you use? You can check this in style.cfg. Could you post your viewforum_body.html?
phpBB styles: we_universalwe_clearblue
Styles news and updates: FacebookGoogle+Twitter
weeb
Registered User
Posts: 392
Joined: Fri Apr 09, 2010 7:54 pm
Contact:

Re: Add "View first unread post" button

by agafed » Tue Oct 04, 2011 6:13 pm

Thanks for your answer...

I figure out to solve one of the issues. Finally I found this and replace it:

weeb wrote:It's probably a bug fixed in upcoming we_* styles update. Open viewtopic_body.html, find:

Code: Select all

<!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a><!-- ENDIF -->

Replace it with:

Code: Select all

<!-- IF not S_IS_BOT --><a href="<!-- IF topicrow.S_UNREAD_TOPIC -->{topicrow.U_NEWEST_POST}<!-- ELSE -->{topicrow.U_LAST_POST}<!-- ENDIF -->">{LAST_POST_IMG}</a><!-- ENDIF -->

This would help.


I don't know why couldn't do it before. But I will like to add the image, because users were familiar using that button.

I'm using 1.0.1 version:

Code: Select all

# General Information about this style
name = we_clearblue
copyright = weeb
version = 1.0.1


And here's the viewforum_body.html file:


Code: Select all

<h4>
            <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->
                                <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG}<!-- ENDIF --> <a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
            <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
            <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF -->
         </h4>



That's the part where I add the code you told me to add.

I appreciate your help...
agafed
Registered User
Posts: 101
Joined: Fri Sep 16, 2011 3:36 am
Contact:

Re: Add "View first unread post" button

by weeb » Wed Oct 05, 2011 3:08 pm

Your code looks good. I've got the piece of prosilver's code for unread icon. It should appear before topic title. Try refresh all style components and purge cache. No more ideas come to me, sorry.
phpBB styles: we_universalwe_clearblue
Styles news and updates: FacebookGoogle+Twitter
weeb
Registered User
Posts: 392
Joined: Fri Apr 09, 2010 7:54 pm
Contact:

Re: Add "View first unread post" button

by agafed » Wed Oct 05, 2011 5:27 pm

Ok, don't worry, thanks!
agafed
Registered User
Posts: 101
Joined: Fri Sep 16, 2011 3:36 am
Contact:

Re: Add "View first unread post" button

by CAH9I » Tue Dec 06, 2011 8:28 pm

Hi
How to make a similar button in serch_result.php?
CAH9I
Registered User
Posts: 1
Joined: Wed Dec 29, 2010 8:49 am
Contact: