![]() |
HITCounter - Link Forum Counter
This is a port originally By Zajako and Mone.
With kind permission i've updated the mod for vBulletin 3.5, this version comes with an enhancement, i.e via your ACP (forum manager) you can adjust the starting value for any counter. Installation is done easily via the importing of an xml file. See screenshots! Enjoy! Update : Huge Respect to KirbyDE who really is the genius behind this mod, cheers dude. Update 1.3 : optimized code - (no more updates to totals) - Thanx KirbyDE If you use this mod please click Install - cheers! |
Can't you do the file edit via a plug-in?
|
Quote:
-b6 |
Quote:
Shouldn't this be in plug-ins then? |
No need to be sorry your right, there is a file edit in three places within "functions_forumlist.php", everything else gets automagically installed via the xml file settings, template, queries etc...
The file edit merges the new 'linkhits' template into the forum home display, maybe the next version will be free of file edits... which would be great! -b6 |
There should be some hooks you can use for the file edits, though, shouldn't there?
|
The Template is not the Problem, can be done with a Plugin.
Hook: forumbit_display PHP Code:
However, getting the count doesn't seem to be possible without the File edit. The other Option would be to use a Query. But this would add 1 Query to Forumhome and every forumdisplay.php call where the Forum being displayed contains sub-forums that are links. Or the Forumcache would have to be rebuild upon every Hit, which is even worse IMHO. However, some furhter suggestions: Your Counter-Update seems to be run every Time smth. is being done in ACP? I'd suggest to get rid of the Settings and the admin_global Plugin. Instead, make a new control in Forum Manager that shows the current Value so the User can just input it's own. Hook: forumdata_start PHP Code:
PHP Code:
Don't execute the Update in Global-Start, as this causes 1 additional Query for every Forum being displayed, no matter if it is a Link or not. Hook: header_redirect PHP Code:
Hook: cache_templates PHP Code:
|
Thanx KirbyDE, i'll look into this...cheers
-b6 |
There you go! I knew Kirby would be able to help. ;)
|
b6gm6n - is the username Kingpin related?
|
Quote:
-b6 |
The game...
If it is was just wondering if you were familiar with what was poisonville.com / is now poisonville.org. If not then you're probably wondering what the hell I'm talking about. |
Just an idea to get rid of the remaining File Edit:
As Forums that act as Links don't have Threads, what about using the threadcount or replycount field for the Counter? This way it would be automatically queried by cache_ordered_forums(). |
Quote:
|
And that wouldn't change if it just used another database field :)
|
Quote:
|
i see what you mean...(i think) so i'd have to alter the template, i already have the extra database field... i dunno if this is possible using my limited knowledge of php/modding etc... i'd need some more advice ;)
-b6 |
Install Code for new Version (I'd suggest to remove the old Install Code)
PHP Code:
PHP Code:
The File-Edit then will not be necessary any longer. |
Quote:
|
Nah, that would only be the new Install/Uninstall Code for the Product.
|
seems to be working within the forum admin, but it's not showing within the forum home, i've reset the edited *.php file (no edits) and followed your instructions, i've added the new install code, un-installed & exported, done all i can do find the reason, but nothing... still won't show.
-b6 |
still ok?
Code:
if (THIS_SCRIPT == 'index' OR THIS_SCRIPT == 'forumdisplay') template is : Code:
<div class="smallfont" align="$stylevar[left]" padding left="20"> |
That's due to construct_forum_bit() wiping out the Value before Hook forumbit_display gets called.
But you should be able to restore it: PHP Code:
|
The template isn't picking it up, but the value is showing ok...check the attached, almost there...
i've placed Code:
$forum['replycount'] = $vbulletin->forumcache["$forumid"]['replycount']; in the template > "$forum[replycount]" does nothing and i've tried re-jigging the merge template part to : Code:
if ($forum['link']) so yet again i'm at an impass...bugger :) i'll need some more help again me thinks :) -b6 |
See the attached XML; works fine for me.
|
wow it does to, thanx so much, you are a freaking genius when it comes to this stuff... i'll upgrade the distro asap, boofo can move this little mod (i kinda helped with) to the extensions section, thanx again Kirby...massive kudos to you.
-b6 |
If the xml is all you need, then it can go in plug-ins, right?
|
No, it's the complete Package (aka Product XML).
|
updated, please move to where ever you see fit, cheers guys.
-b6 |
Moved to Plugins.
Another File Edit nailed ... strike :D |
hehe Kirby, you kill me! LOL
|
Shouldn't there be a template eidt for this? ;)
|
cant get this to work the plugin shows blank for me :(
|
Common Mistake: You must import this as a Product.
|
cheers kirby, was just about to say that! :)
-b6 |
if i change skin i will have to reinstall the plugin?
|
It does work in all Styles.
|
What do you put in what template to get it to show anything?
|
Quote:
|
Yeah i think so Boofo... ;) - This little Mod should work with all skins without a re-install
-b6 |
All times are GMT. The time now is 08:01 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|