Log in Register FAQ Memberlist Search Welcome to RCF - WHF Forum Index
alt : test.swf
Welcome to RCF - WHF
4fx3.gif 
Contact the Webmasters of RCFContact   Invite a friend to Join usRecommend   Chat in IRCChat   EZ Template Change OptionEZStyle   Listen to Internet Radio while you browse...iRadio   See your private message.Login for PMs   Important LinksLinks
Member Website LinksWeb Links   Play/View our GamesGames   Register.Register
calendar_open_closeCalendar 
Mod help - again
Post new topic   Reply to topic View previous topic :: View next topic
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support Add To Bookmarks
Mod help - again
PostPosted: 01/09/2006 3:55 PM Reply with quote
Citation
Glenn I
Citation
Posts 2152
Word Cnt. 78,257
BDay Jun 15
Sign Gemini
Sex Sex:Male
Joined: Apr 22, 2005
Local time: 10:36 PM
Location: Upside down
australC_1xa.gif
This mod - Users viewing forum on Index http://www.phpbb.com/phpBB/viewtopic.php?t=355395

I'm posting here because I'm not getting much helo over at phpbb.com.

This mod is supposed to show how many people are viewing a forum like this -

http://img382.imageshack.us/img382/3443/ssdem1re.jpg

But on my board it appears like this -

http://img212.imageshack.us/img212/5021/1view7up.jpg

Notice the gap between the forum name and forum description. It is the same with all forums.

Here is the code -

Code:
#################################################################
## MOD Title: Users viewing forum on Index
## MOD Author: Eminem_Fan < N/A > (Dean Oakes) N/A
## MOD Description: This modification will add the 'vBulletin Style' Users viewing this forum to the index.
## MOD Version: 1.1.0
##
## Installation Level: Easy
## Installation Time: 10 Minutes
## Files To Edit:   index.php
##               language/lang_english/lang_main.php
##               templates/subSilver/index_body.tpl
## Included Files:   N/A
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##   As requested by oo1985, This feature can be found in vBulletin.
##############################################################
## MOD History:
##
##   2005-26-12 - Version 0.1.0
##   -   Stable Release
##
##   2005-27-12 - Version 1.0.0
##   -   Submitted to the MOD-DB.
##
##   2006-07-01 - Version 1.1.0
##   -   Fixed up the mod template and resubmitted.
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################

#
#-----[ OPEN ]------------------------------------------
#
index.php

#
#-----[ FIND ]------------------------------------------
#
   $is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);

#
#-----[ AFTER, ADD ]------------------------------------------
#
   //
   // Get the user count viewing the forums.
   //
   $forum_view_count = array();
   $sql = "SELECT u.user_id, s.session_page
      FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s
         WHERE u.user_id = s.session_user_id
            AND s.session_time >= ".( time() - 300 );
   if(! $result = $db->sql_query($sql) )
   {
      message_die(GENERAL_ERROR, 'Unable to get current sessions for users viewing forum.', '', __LINE__, __FILE__, $sql);
   }
   while( $row = $db->sql_fetchrow($result) )
   {
      if(! isset($forum_view_count[ $row['session_page'] ]) )
      {
         $forum_view_count[ $row['session_page'] ] = 0;
      }
      $forum_view_count[ $row['session_page'] ]++;
   }
#
#-----[ FIND ]------------------------------------------
#
'L_ONLINE_EXPLAIN' =>

#
#-----[ AFTER, ADD ]------------------------------------------
#
      'L_USERS_VIEWING' => $lang['users_viewing_forum'],

#
#-----[ FIND ]------------------------------------------
#
$row_class = ( !($i % 2) ) ?

#
#-----[ AFTER, ADD ]------------------------------------------
#
$users_viewing = $forum_view_count[$forum_data[$j]['forum_id']];

#
#-----[ FIND ]------------------------------------------
#
'MODERATORS' =>

#
#-----[ AFTER, ADD ]------------------------------------------
#
                        'USERS_VIEWING' => $users_viewing,

#
#-----[ FIND ]------------------------------------------
#
                        'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
                     );

#
#-----[ AFTER, ADD ]------------------------------------------
#
                     if($users_viewing)
                     {
                        $template->assign_block_vars('catrow.forumrow.switch_users_viewing', array());
                     }

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['users_viewing_forum'] = 'Viewing';

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/index_body.tpl

#
#-----[ FIND ]------------------------------------------
#
   </span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />

#
#-----[ REPLACE WITH ]------------------------------------------
#
   </span><span class="gensmall">
   <!-- BEGIN switch_users_viewing -->
   ({catrow.forumrow.USERS_VIEWING} {L_USERS_VIEWING})
   <!-- END switch_users_viewing -->
   </span> <span class="genmed"><br />{catrow.forumrow.FORUM_DESC}<br />

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


Ok, I thought that the gap had something to do with the <br/> tags in the index_body.tpl file like this -

Code:
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/index_body.tpl

#
#-----[ FIND ]------------------------------------------
#
   </span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />

#
#-----[ REPLACE WITH ]------------------------------------------
#
   </span><span class="gensmall">
   <!-- BEGIN switch_users_viewing -->
   ({catrow.forumrow.USERS_VIEWING} {L_USERS_VIEWING})
   <!-- END switch_users_viewing -->
   </span> <span class="genmed"><br />{catrow.forumrow.FORUM_DESC}<br />

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


You will notice an extra <br/> there so I removed the first one and sure it closed the gap but the (* viewing) part is still on the same line. There must be another part that places this next to the forum name like in the first picture I posted but I cannot work that part out. Any ideas?

Thanks
Back to Top
View user's profile Find all posts by Glenn I Send private message   Visit poster's website Phoogle Map
Mod help - again
PostPosted: 01/09/2006 10:22 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30756
Word Cnt. 2,628,678
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 8:36 AM
Location: St Pete, FL
peace.gif
Is this what you had in mind???



If so, then you had an extra <br /> on the previous line from the code that was added...

dontknow
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: Mod help - again
PostPosted: 01/09/2006 10:49 PM Reply with quote
Citation
Glenn I
Citation
Posts 2152
Word Cnt. 78,257
BDay Jun 15
Sign Gemini
Sex Sex:Male
Joined: Apr 22, 2005
Local time: 10:36 PM
Location: Upside down
australC_1xa.gif
yep it is. Where abouts was that because the only two of those tags I saw were in this line -

Code:
</span> <span class="genmed"><br />{catrow.forumrow.FORUM_DESC}<br />


I removed the first br tag and and the (*viewing) was appearing in the same line as the forum description

I tried to solve it myself but ohh well. Thanks.
Back to Top
View user's profile Find all posts by Glenn I Send private message   Visit poster's website Phoogle Map
Re: Mod help - again
PostPosted: 01/09/2006 11:09 PM Reply with quote
Citation
Glenn I
Citation
Posts 2152
Word Cnt. 78,257
BDay Jun 15
Sign Gemini
Sex Sex:Male
Joined: Apr 22, 2005
Local time: 10:36 PM
Location: Upside down
australC_1xa.gif
Would you know if it was possible to change the text colour of the (*viewing) ?
Back to Top
View user's profile Find all posts by Glenn I Send private message   Visit poster's website Phoogle Map
Mod help - again
PostPosted: 01/09/2006 11:19 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30756
Word Cnt. 2,628,678
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 8:36 AM
Location: St Pete, FL
peace.gif
Of course it's possible.  I will have to help you with that later though.  I'm struggling with a few problems of my own right now.  My HDD is going bad.  Luckily it is still under warranty, so I need to get everything I can backed up and hopefully burned to DVD so that I can package it and get it shipped back to Maxtor...

My PC crashed for the 4th time today in 2 weeks, but this time I didn't have to restore the image.  I ran Maxtor's HDD utility from Hiren's BootCD today and found that the HDD is definitely the problem...

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: Mod help - again
PostPosted: 01/09/2006 11:21 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30756
Word Cnt. 2,628,678
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 8:36 AM
Location: St Pete, FL
peace.gif
Glenn I wrote:
yep it is. Where abouts was that because the only two of those tags I saw were in this line -

The extra <br /> was in the previous line, not added by the MOD...

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: Mod help - again
PostPosted: 01/10/2006 12:02 AM Reply with quote
Citation
Glenn I
Citation
Posts 2152
Word Cnt. 78,257
BDay Jun 15
Sign Gemini
Sex Sex:Male
Joined: Apr 22, 2005
Local time: 10:36 PM
Location: Upside down
australC_1xa.gif
Bummer about your drive. No hurry.

Quote:
The extra
was in the previous line, not added by the MOD...


Ok, thats why I didn't see it.
Back to Top
View user's profile Find all posts by Glenn I Send private message   Visit poster's website Phoogle Map
Re: Mod help - again
PostPosted: 01/12/2006 10:01 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30756
Word Cnt. 2,628,678
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 8:36 AM
Location: St Pete, FL
peace.gif
Glenn I wrote:
Would you know if it was possible to change the text colour of the (*viewing) ?

I still haven't received my replacement HDD from Maxtor, so my browser continually freezes for a few seconds or more regularly due to the HDD problem.  As a result, I am running at slow speed right now and playing catchup all over the place...

If you want to work on this tonight, we can if you want.  The easiest way to handle this is the same that we handled the color for the Today/Yesterday MOD.  So there would need to be changes in both the template cfg and lang_main.php files...

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: Mod help - again
PostPosted: 01/13/2006 2:52 AM Reply with quote
Citation
Glenn I
Citation
Posts 2152
Word Cnt. 78,257
BDay Jun 15
Sign Gemini
Sex Sex:Male
Joined: Apr 22, 2005
Local time: 10:36 PM
Location: Upside down
australC_1xa.gif
Ok no worries. I was thinking if it would be worth the while to do it or not.  dontknow

Might not worry about it  grommit
Back to Top
View user's profile Find all posts by Glenn I Send private message   Visit poster's website Phoogle Map
Mod help - again
PostPosted: 01/13/2006 3:37 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30756
Word Cnt. 2,628,678
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 8:36 AM
Location: St Pete, FL
peace.gif
It wouldn't be a big deal to make this change if you still want to do it.  You probably would only need to change 4 files total, 3 template cfg files and one language file...

dontknow
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

Page 1 of 1


Add To Bookmarks

 
  
  


  Google

Powered by phpBB © 2001, 2005 phpBB Group
  ImageShack  
  Putfile  
  TinyURL  
  CommonDreams  
  Log in  

Page generation time: 0.1616s (PHP: 85% - SQL: 15%) - SQL queries: 61 - GZIP enabled - Debug on