Log in Register FAQ Memberlist Search Welcome to RCF - WHF Forum Index
alt : test.swf
Welcome to RCF - WHF
4fx3.gif 
calendar_open_closeCalendar 
[Solved] "View unanswered posts" link
Post new topic   Reply to topic View previous topic :: View next topic
Goto page: 1, 2  Next
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support Add To Bookmarks
[Solved] "View unanswered posts" link
PostPosted: 06/17/2007 4:41 AM Reply with quote
Citation
Chris Powell
Citation
Posts 1332
Word Cnt. 86,126
BDay Feb 11
Sign Aquarius
Sex Sex:Male
Joined: Mar 31, 2007
Local time: 10:55 AM
Location: Birmingham, UK.
greatbrE.gif
Nightrider, how do i get the "View unanswered posts" link to show to guests!?!?
Back to Top
View user's profile Find all posts by Chris Powell Send private message   Visit poster's website
Re: "View unanswered posts" link
PostPosted: 06/17/2007 6:23 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 5:55 AM
Location: St Pete, FL
peace.gif
Currently all of those links are embedded in a Switch for Logged in users in your index_body.tpl file.

Code:
      <!-- BEGIN switch_user_logged_in -->
      <a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br />
      <a href="{U_SEARCH_NEW_TOPICS}" class="gensmall">{L_SEARCH_NEW_TOPICS}</a><br />
      <a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a><br />
      <a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
      <a href="{U_SEARCH_SELF_TOPICS}" class="gensmall">{L_SEARCH_SELF_TOPICS}</a><br />
      <!-- END switch_user_logged_in -->

If you want anything from this group to be available to both guests and members, you need to move the link outside of the switch_user_logged_in switch.  Notice that there is a begin and end line for this switch, so everything in between can only be seen by logged in members...

headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] "View unanswered posts" link
PostPosted: 06/17/2007 6:41 AM Reply with quote
Citation
Chris Powell
Citation
Posts 1332
Word Cnt. 86,126
BDay Feb 11
Sign Aquarius
Sex Sex:Male
Joined: Mar 31, 2007
Local time: 10:55 AM
Location: Birmingham, UK.
greatbrE.gif
I had trouble with this before because i wanted the links to show like this

Code:
View posts since last visit (0)
View topics since last visit
View unanswered posts
           View your posts
           View your topics


but when placing the UNANSWERED link under U_SEARCH_SELF_TOPICS

the links then appear like this

Code:
View posts since last visit (0)
View topics since last visit
              View your posts
              View your topics
View unanswered posts


hope you know what i mean NR  banana
Back to Top
View user's profile Find all posts by Chris Powell Send private message   Visit poster's website
Re: "View unanswered posts" link
PostPosted: 06/17/2007 6:48 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 5:55 AM
Location: St Pete, FL
peace.gif
You could use more than one set of switches to get this to display as you want.  You would do something like this:

OPEN
index_body.tpl

FIND
Code:
<!-- BEGIN switch_user_logged_in -->
<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br />
<a href="{U_SEARCH_NEW_TOPICS}" class="gensmall">{L_SEARCH_NEW_TOPICS}</a><br />
<a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a><br />
<a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
<a href="{U_SEARCH_SELF_TOPICS}" class="gensmall">{L_SEARCH_SELF_TOPICS}</a><br />
<!-- END switch_user_logged_in -->

REPLACE WITH
Code:
<!-- BEGIN switch_user_logged_in -->
<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br />
<a href="{U_SEARCH_NEW_TOPICS}" class="gensmall">{L_SEARCH_NEW_TOPICS}</a><br />
<!-- END switch_user_logged_in -->
<a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a><br />
<!-- BEGIN switch_user_logged_in -->
<a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
<a href="{U_SEARCH_SELF_TOPICS}" class="gensmall">{L_SEARCH_SELF_TOPICS}</a><br />
<!-- END switch_user_logged_in -->

headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] "View unanswered posts" link
PostPosted: 06/17/2007 6:59 AM Reply with quote
Citation
Chris Powell
Citation
Posts 1332
Word Cnt. 86,126
BDay Feb 11
Sign Aquarius
Sex Sex:Male
Joined: Mar 31, 2007
Local time: 10:55 AM
Location: Birmingham, UK.
greatbrE.gif
Perfect! Very Happy

Another thing  banana

When a user is logged in they can see a number next to "View posts since last visit". Is it possible to do the same with View topics since last visit?
Back to Top
View user's profile Find all posts by Chris Powell Send private message   Visit poster's website
Re: "View unanswered posts" link
PostPosted: 06/18/2007 1:52 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 5:55 AM
Location: St Pete, FL
peace.gif
Yes, it would be possible, but you would have to do something like what they are doing to count the new posts in your MOD_newposts_number.php file.  That whole file is devoted to counting the number of new posts.  As you can see, it isn't a small file.  You could probably duplicate the file and change the SQL queries to pull from the Topics table.  This is not a small request though even though it sounds like it since all you want is a number...

munky2
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] "View unanswered posts" link
PostPosted: 06/18/2007 5:32 AM Reply with quote
Citation
Chris Powell
Citation
Posts 1332
Word Cnt. 86,126
BDay Feb 11
Sign Aquarius
Sex Sex:Male
Joined: Mar 31, 2007
Local time: 10:55 AM
Location: Birmingham, UK.
greatbrE.gif
I got this of phpBB.com ( http://www.phpbb.com/community/viewtopic.php?f=15&t=222168&st=0&sk=t&s d=a&start=15 )

Code:
if( $userdata['session_logged_in'] )
{
   $sql = "SELECT COUNT(topic_id) as total
      FROM " . TOPICS_TABLE . "
      WHERE topic_time >= " . $userdata['user_lastvisit'] . "
      AND topic_poster != " . $userdata['user_id'] . "
      AND topic_first_post_id > " . 0 ;
      
   $result = $db->sql_query($sql);
   if( $result )
   {
      $row = $db->sql_fetchrow($result);
      $lang['Search_new_topics'] = $lang['Search_new_topics'] . " (" . $row['total'] . ")";
   }
$db->sql_freeresult($result);
}


Theres no mention of where to use the code though  dontknow
Back to Top
View user's profile Find all posts by Chris Powell Send private message   Visit poster's website
Re: "View unanswered posts" link
PostPosted: 06/18/2007 10:38 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 5:55 AM
Location: St Pete, FL
peace.gif
This code will count all new topics whether the member has access to the forums where they are posted or not.  If that is acceptable to you, then I can create a MOD that would add this to your forum...

munky2
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] "View unanswered posts" link
PostPosted: 06/19/2007 1:52 AM Reply with quote
Citation
Chris Powell
Citation
Posts 1332
Word Cnt. 86,126
BDay Feb 11
Sign Aquarius
Sex Sex:Male
Joined: Mar 31, 2007
Local time: 10:55 AM
Location: Birmingham, UK.
greatbrE.gif
not sure about that to be honest, the latter would be cool though. I'd like it on your forum to  banana
Back to Top
View user's profile Find all posts by Chris Powell Send private message   Visit poster's website
Re: "View unanswered posts" link
PostPosted: 06/19/2007 2:41 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 5:55 AM
Location: St Pete, FL
peace.gif
Ok, you can download this and install it using EM...

View_New_Topic_Count_100.zip

headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
 Post new topic  Reply to topic
Information
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
All times are GMT - 5 Hours
Goto page: 1, 2  Next
Page 1 of 2


Add To Bookmarks

 
  
  


  Google

Powered by phpBB © 2001, 2005 phpBB Group

Page generation time: 1.38s (PHP: 7% - SQL: 93%) - SQL queries: 57 - GZIP disabled - Debug on