About this Top Pop mod

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   About this Top Pop mod
stealthusa
CZ Addict
stealthusa has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Self-Employed
Age: 58
Gender: Male
Fav. Sports Team: Cowboys
Website:
Status: Offline
Joined: Jan 23, 2004
0.05 posts per day
Posts: 353
Points: 14,459
 Yahoo Messenger  ICQ Number
Hello i just put in this Top Pop and it is all working but when you click on the link at the top it sends you to a page and this is what you get. or i should say this is what it says
You can't access this file directly...

can someone tell me what i did wrong.



Back to top Reply with quote
#2   re: About this Top Pop mod
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.70 posts per day
Posts: 5530
Points: 481,695
   
where did you get this mod? and what is it supposed to do?


taut



Back to top Reply with quote
#3   
stealthusa
CZ Addict
stealthusa has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Self-Employed
Age: 58
Gender: Male
Fav. Sports Team: Cowboys
Website:
Status: Offline
Joined: Jan 23, 2004
0.05 posts per day
Posts: 353
Points: 14,459
 Yahoo Messenger  ICQ Number
Mod Title: The last Five and the Five popular (answers/views) on index.php
## Mod Version: 1.0.0
## Author: Andrey Politov aka Sergeant < [ Register or login to view links on this board. ] >
## Description: Adds small table (2 columns) on the top of the forum index with 5 popular
## (with maximum answers) and 5 popular (with maximum views). It helps to keep on the top interesting topics. ## You can see example of this Mod: [ Register or login to view links on this board. ]
## Ported for Nuke by Telli [ Register or login to view links on this board. ] [ Register or login to view links on this board. ]

from here



Back to top Reply with quote
#4   re: About this Top Pop mod
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
Hi can you post an example of one of the links please.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   
stealthusa
CZ Addict
stealthusa has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Self-Employed
Age: 58
Gender: Male
Fav. Sports Team: Cowboys
Website:
Status: Offline
Joined: Jan 23, 2004
0.05 posts per day
Posts: 353
Points: 14,459
 Yahoo Messenger  ICQ Number
[ Register or login to view links on this board. ]



Back to top Reply with quote
#6   re: About this Top Pop mod
Omega_Red3T
CZ Newbie
Omega_Red3T has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Feb 20, 2004
0.00 posts per day
Posts: 2
Points: 351
   
I am having the exact same problem....
I think something in the directory path isn't right.
I am using Nuke 6.9
Need Help....

Thanks in advance

Omega Red



Back to top Reply with quote
#7   re: About this Top Pop mod
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
Ok i updated the download but you can change it too.

Find in modules/Forums/index.php

$lastpost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line['topic_id'] . "\" title=\"" . $line['topic_title'] ."\">" . $line_topic_title . "</a>";
      $poppost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line2['topic_id'] . "\" title=\"" . $line2['topic_title'] ."\">" . $line_topic_title2 . "</a>";
      $poppostc = $line2['topic_replies'];
      $popviewpost = "<a href=\"".$phpbb_root_path."viewtopic.php?t=" . $line3['topic_id'] . "\" title=\"" . $line3['topic_title'] ."\">" . $line_topic_title3 . "</a>";
      $popviewpostc = $line3['topic_views'];



Replace with

$lastpost = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_TOPIC_URL . '=' . $line['topic_id']) . '">' . $line_topic_title . '</a>';
      $poppost = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_TOPIC_URL . '=' . $line2['topic_id']) . '">' . $line_topic_title2 . '</a>';
      $poppostc = $line2['topic_replies'];
      $popviewpost = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_TOPIC_URL . '=' . $line3['topic_id']) . '">' . $line_topic_title3 . '</a>';
      $popviewpostc = $line3['topic_views'];


And that should do it!



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#8   
Omega_Red3T
CZ Newbie
Omega_Red3T has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Feb 20, 2004
0.00 posts per day
Posts: 2
Points: 351
   
Thanks a lot Telli... That worked great.

I have another question....Is there a way to make the Forum stretch to fit the whole webpage. I want to get rid of the menu and other modules that are still shown on the left side of the page.

icon_biggrin.gif icon_biggrin.gif



Back to top Reply with quote
#9   
stealthusa
CZ Addict
stealthusa has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Self-Employed
Age: 58
Gender: Male
Fav. Sports Team: Cowboys
Website:
Status: Offline
Joined: Jan 23, 2004
0.05 posts per day
Posts: 353
Points: 14,459
 Yahoo Messenger  ICQ Number
thank you this is a big help
you are the greatest




_________________
Back to top Reply with quote
#10   re: About this Top Pop mod
anil
CZ Super Newbie
anil has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jan 04, 2004
0.00 posts per day
Posts: 37
Points: 2,062
   
I downloaded this module and there are no instructions as to what needs to be added or edited in 'themes/YOUR_THEME/forums/index_body.tpl'



#
#-----[ FIND IN index.php ]-----------------------------------------
#
   //
   // Okay, let's build the index
   //
   for($i = 0; $i < $total_categories; $i++)
   {
      $cat_id = $category_rows[$i]['cat_id'];

#
#-----[ ADD BEFORE ]------------------------------
#
   //
   // Okay, let's build the topic recent and popular
   //
$active_topics_sql="SELECT a.topic_id,a.topic_title,  a.topic_replies,  a.topic_last_post_id, c.post_time
         FROM nuke_bbtopics a, nuke_users b,nuke_bbposts c,nuke_bbforums d
         where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
            and d.forum_id=a.forum_id
            and d.auth_view=0
         ORDER BY topic_last_post_id DESC
         LIMIT 5";
$active_topics = $db->sql_query($active_topics_sql);

$active_topics_sql2="SELECT a.topic_id,a.topic_title,  a.topic_replies,  a.topic_last_post_id, c.post_time
         FROM nuke_bbtopics a, nuke_users b, nuke_bbposts c, nuke_bbforums d
         where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
            and d.forum_id=a.forum_id
            and d.auth_view=0
         ORDER BY topic_replies DESC
         LIMIT 5";
$active_topics2 = $db->sql_query($active_topics_sql2);

$active_topics_sql3="SELECT a.topic_id,a.topic_title,  a.topic_views, a.topic_replies,  a.topic_last_post_id, c.post_time
         FROM nuke_bbtopics a, nuke_users b, nuke_bbposts c, nuke_bbforums d
         where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
            and d.forum_id=a.forum_id
            and d.auth_view=0
         ORDER BY topic_views DESC
         LIMIT 5";
$active_topics3 = $db->sql_query($active_topics_sql3);

   while (($line = mysql_fetch_array($active_topics)) and ($line2 = mysql_fetch_array($active_topics2)) and ($line3 = mysql_fetch_array($active_topics3)))
   {
      if (strlen($line['topic_title']) > 40)
      {
         $line_topic_title = substr($line['topic_title'], 0, 40)." ...";
      }
      else
      {
         $line_topic_title = $line['topic_title'];
      }
      if (strlen($line2['topic_title']) > 40)
      {
         $line_topic_title2 = substr($line2['topic_title'], 0, 40)." ...";
      }
      else
      {
         $line_topic_title2 = $line2['topic_title'];
      }
      if (strlen($line3['topic_title']) > 40)
      {
         $line_topic_title3 = substr($line3['topic_title'], 0, 40)." ...";
      }
      else
      {
         $line_topic_title3 = $line3['topic_title'];
      }
      $lastpost = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_TOPIC_URL . '=' . $line['topic_id']) . '">' . $line_topic_title . '</a>';
      $poppost = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_TOPIC_URL . '=' . $line2['topic_id']) . '">' . $line_topic_title2 . '</a>';
      $poppostc = $line2['topic_replies'];
      $popviewpost = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_TOPIC_URL . '=' . $line3['topic_id']) . '">' . $line_topic_title3 . '</a>';
      $popviewpostc = $line3['topic_views'];
      $template->assign_block_vars('topicrecentpopular', array(
         'TOPICSPOPULAR' => $poppost,
         'TOPICSPOPULARC' => $poppostc,
         'TOPICSPOPULARVIEW' => $popviewpost,
         'TOPICSPOPULARVIEWC' => $popviewpostc,
         'TOPICSRECENT' => $lastpost)
      );
   }


#
#-----[ SAVE & CLOSE index.php ]------------------------------
#

#
#-----[ FIND IN templates/subSilver/index_body.tpl ]------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr>
   <th colspan="2" class="thCornerL" height="25" nowrap="nowrap"> ;;{L_FORUM} ;;</th>
   <th width="50" class="thTop" nowrap="nowrap"> ;;{L_TOPICS} ;;</th>
   <th width="50" class="thTop" nowrap="nowrap"> ;;{L_POSTS} ;;</th>
   <th class="thCornerR" nowrap="nowrap"> ;;{L_LASTPOST} ;;</th>
  </tr>
  <!-- BEGIN catrow -->

#
#-----[ ADD BEFORE ]------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr>
   <th width="50%" colspan="2" class="thTop" nowrap="nowrap"> ;;{L_TOPICSPOPULAR} ;;</th>
   <th width="50%" colspan="2" class="thTop" nowrap="nowrap"> ;;{L_TOPICSPOPULARVIEW} ;;</th>
  </tr>
  <!-- BEGIN topicrecentpopular -->
  <tr>
   <td width="44%" class="row2" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULAR}</span></td>
   <td width="6%" class="row2" align="center" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARC}</span></td>
   <td width="44%" class="row2" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARVIEW}</span></td>
   <td width="6%" class="row2" align="center" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARVIEWC}</span></td>
  </tr>
  <!-- END topicrecentpopular -->
</table>
<br />

#
#-----[ SAVE & CLOSE templates/subSilver/index_body.tpl ]------------------------------
#

#
#-----[ FIND IN includes/page_header.php ]------------------------------
#
        'L_SEARCH' => $lang['Search'],

#
#-----[ ADD AFTER ]------------------------------
#
       
        'L_TOPICSPOPULAR' => $lang['TopicsPopular'],
        'L_TOPICSPOPULARVIEW' => $lang['TopicsPopularView'],

#
#-----[ SAVE & CLOSE includes/page_header.php ]------------------------------
#


#
#-----[ FIND IN language/lang_english/lang_main.php ]------------------------------
#
$lang['Topics'] = 'Topics';

#
#-----[ ADD AFTER ]------------------------------
#

$lang['TopicsPopular'] = "Popular Topics (by reply)";
$lang['TopicsPopularView'] = "Popular Topics (by view)";

#
#-----[ SAVE & CLOSE language/lang_english/lang_main.php ]------------------------------
#


#
#-----[ DONE ]------------------------------
#


That is everything in the installation file.

\a


Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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