View Single Post
  #35  
Old 06-23-2004, 08:40 AM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CreedFeed
I have another question about adding to this hack... when you view your forum's Who's Online page it shows any user who's browsing the gallery as "Viewing Index" and the link below goes to the forum index. How would you edit it to say "Viewing Gallery" and the link below links to your gallery?
Read the instruction file and follow the steps carefully.

There's a part in step 4 to do it:

======================
<edit file>
includes/functions_online.php
</edit file>
======================

<search for>
PHP Code:
 switch($userinfo['activity'])

</search for>
<add after>
PHP Code:
// Album user online Mod
case 'album':
$userinfo['action'] = 'Browsing album';
$userinfo['where'] = "<a href=\"$userinfo[location]\">$userinfo[location]</a>";
break;
// End 
</add after>
======================
<search for>
PHP Code:
 else
{
$userinfo['activity'] = 'modcp';
}
return 
$userinfo;

</search for>
<add after>
PHP Code:
// Album user location 
else if (strpos($token"/album/") !== false)
{
{
$userinfo['activity'] = 'album';
}
return 
$userinfo;

</add after>
======================

make sure that you have that part correct
and remember to correct the token too

else if (strpos($token, "/album/") !== false)


Quote:
mtha, say I'm running more than one 4images on my site..
I'm using one for a .. let's say "classified" script, and the other as an "album" script.

In the "functions_online.php" how would I make it so one says, "Browsing Album" and the other say, "Browsing Classifieds"??
same as above, you have another token for /classified/ add add the same code (replace the name) in the places




by the way, the $token will read the value from $userinfo['location'];
if you dont have the location field for album different from forum's, you may get in trouble with this
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01489 seconds
  • Memory Usage 1,779KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete