vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - Top Posters List (https://vborg.vbsupport.ru/showthread.php?t=232021)

Paul M 08-24-2012 12:48 AM

There is no code to perform redirects in it.

Amaury 11-24-2012 12:51 AM

Installed!

Two questions, though:
  1. What controls the background?
  2. Is it possible to create a plugin hook or something to make the Current Activity be "Viewing Page Top Posters" (Top Posters being a link) instead of that Viewing Top Posters with the URL?
http://i101.photobucket.com/albums/m...TopPosters.png


https://vborg.vbsupport.ru/

EDIT: Never mind the first one.

I fixed it by inserting this into the additional.css template, changing the color accordingly when I added it to the additional.css template for Dance of the Dream Eater (Light).

Code:

.toptable td {
    border: 1px solid black;
}

.toptable .alt1 {
    border: 1px solid black;
    background: #323232;
}

.toptable .alt2 {
    border: 1px solid black;
    background: #323232;
}


Amaury 11-28-2012 03:16 AM

Quote:

Originally Posted by Amaury25 (Post 2384389)
Is it possible to create a plugin hook or something to make the Current Activity be "Viewing Page Top Posters" (Top Posters being a link) instead of that Viewing Top Posters with the URL?[/LIST][IMG]http://i101.photobucket.com/albums/m62/AmauryGarcia/TopPosters.png[

http://i101.photobucket.com/albums/m...Activity-2.png

Bump.

SoloX 12-15-2012 07:21 AM

generates lots of load on the server with many users. anyway to cache this?

Paul M 12-16-2012 10:12 PM

Multiple repeat posts removed. If someone is going to answer you they will, we dont need repeated posts with huge images every week.

SoloX 12-23-2012 02:31 AM

here is what i did to reduce the load on the server.

i created a cron job to run every 4 hrs and save output to an html file. i then created a link in Quick Links ..

PHP Code:

0 0,4,8,12,16,20 * * *  /usr/bin/curl http://mydomain.com/forums/misc.php?do=topposters > /var/www/localhost/htdocs/forums/top.html 


Amaury 12-29-2012 10:48 PM

Okay, I got it to sort of work.

online_location_unknown:

Code:

if ($userinfo['activity'] == 'topposters')
{
    $handled = true;
    $userinfo['action'] = $vbphrase['top_view'];
    $userinfo['where'] = '<a href="misc.php?do=topposters">'.$vbulletin->options['bburl'].'/misc.php?do=topposters</a>';
}

I changed it to this:

Code:

if ($userinfo['activity'] == 'topposters')
{
    $handled = true;
    $userinfo['action'] = "Viewing Page";
    $userinfo['where'] = '<a href="misc.php?do=topposters">'.$vbulletin->options['bburl'].'/misc.php?do=topposters</a>';
}

However, I still can't get the URL to just be a simple hyperlink (Top Posters).

Code:

if ($filename == 'topposters.php')
{
    $userinfo['activity'] = 'topposters';
}

I tried changing that to this, but it just made it appear as an unknown location:

Code:

switch ($filename == 'topposters.php')
{
    case 'topposters.php':
        $userinfo['activity'] = 'Top Posters';
        break;
}

Any help?

EDIT: I changed online_location_unknown again and made it this:

Code:

switch ($userinfo['activity'])
{
    case 'Top Posters':
        $userinfo['where'] = '<a href="misc.php?do=topposters">'.$vbulletin->options['bburl'].'/misc.php?do=topposters</a>';
        $userinfo['action'] = "Viewing Page";
        $handled = true;
        break;
}

...and the activity name is still not working how I want it to.

This is what it should be:
Viewing Page Top Posters

This is what it says:
Viewing Page http://www.kh-mediaflare.net/misc.php?do=topposters

Any help will be greatly appreciated.

Paul M 12-30-2012 12:06 AM

You seem to be over complicating a simple change.

Simply replace ;
PHP Code:

$userinfo['where'] = '<a href="misc.php?do=topposters">'.$vbulletin->options['bburl'].'/misc.php?do=topposters</a>'


With
PHP Code:

$userinfo['where'] = '<a href="misc.php?do=topposters">'.$vbphrase['top_list'].'</a>'


Nothing else needs to be done.

Amaury 12-30-2012 12:22 AM

Quote:

Originally Posted by Paul M (Post 2393522)
You seem to be over complicating a simple change.

Simply replace ;
PHP Code:

$userinfo['where'] = '<a href="misc.php?do=topposters">'.$vbulletin->options['bburl'].'/misc.php?do=topposters</a>'

With
PHP Code:

$userinfo['where'] = '<a href="misc.php?do=topposters">'.$vbphrase['top_list'].'</a>'

Nothing else needs to be done.

I really appreciate the help, Paul, and I apologize. I've modified plugins for activity name stuff before, and this one was just getting to me because of that extra information.

Anyway, I reverted the changes I did and changed what you told me to change, and it worked.

The only additional change I made was changing this:

Code:

$userinfo['action'] = $vbphrase['top_view'];
...to this:

Code:

$userinfo['action'] = "Viewing Page";
That way it says Viewing Page Top Posters instead of Viewing Top Posters Top Posters.

Thanks again, Paul! :)

Paul M 12-30-2012 11:20 PM

You should not change the code, but simply edit the phrase.


All times are GMT. The time now is 01:51 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01340 seconds
  • Memory Usage 1,758KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (5)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete