UBB.Dev
Ok I am going to release this hack. It's is a views counter that works with the cache, but does not work with the accelerator. It is VERY BETA, I warn you up front, so don't scream and yell if it doesn't work perfect. In fact, if you are not comfortable installing BETA hacks, don't install this at all. With those things in mind, download the hack below. This hack was based off of JB007's original hack for 6.0x.

Download
Views Counter 5.0 [BETA]

Demo
http://www.vhforums.com

[ 11-28-2001 06:18 PM: Message edited by: Slurpee ]
Thanks Slurpee... if you used JB's from before and upgraded to this one, would the counts form the old one remain?
Yep did on mine.
Is there a way to keep the date and time of when the thread was started? Took alook at your site and think this is going to be another one of those must haves!
I don't think I have that anywhere, I just have the last time the topic was replied to on the topic page. What am I missing? Where are you looking?
I took a look at your site vs my development site. Mine also has along with the user, the date and time the thread started.

My develoment site:
www.pwrhouse.com/cgi-bin/ultimatebb.cgi
I see what you're talking about. Yes you have that on your Topics Display, I don't. So now what's the question you're asking?
To also include the date and time stamps of when the thread started
Oh you mean as part of this Views Counter thing?
Yeppers
I'm a little confused in ubb_forum.cgi part.

Quote
quote:
but i already have the who's online code there. Do i skip over this step if i do er...what?
It works fine with me. There is an error in the code I think you should add a "}" in this code
Code
code:
it should be
Code
code:
another thing if you have last replay by hack instald you should change this
Code
code:
to be
Code
code:
I am not sour about the last step because I have added a colomin for this hack in the form page
I am using v6.1.0.3
Oh I forget
Thank you very much for this hack I rely need it in my form
Code
code:

[ 11-27-2001 12:08 AM: Message edited by: Slurpee ]
Quote
quote:
Thanks made the fix. With regards to placement because of other hacks....There is no way for me to make a bunch of different variations of this hack with all the possible layout changes and hacks people have added. You will have to have some understanding of placing variables in the public_forum_page.pl template if you have a bunch of different hacks that are affecting placement of the $v_counter variable.
I do BEG you please make it compatible with qasics hacks. Whois online. I am sure qasic will help if you ask He is a heck of a guy (when you can get him to respond to ya LoL)

Anyway if it is compatibale with popular hack it would be nice. Anyone who finds out what it is compatible with should list them so you know what hacks cause problems. That way when people ask you can tell them that it is compatible with or not any particular hack.. (Less problems for you the DEV if you know what works and what doesn't)

Anyways this is only a suggestion...
In this part the v_counter with hypercells in public_forum_page.pl:



$TheDate
$last_time
$last_post_username $v_counter

This was crushing the tables.
Can anyone tell us if this mod worked with Hypercells and Last reply ? It will be great if he tell us the code we must change in public_forum.pl

Oh and dont forget
Great job Slurpee
please she can help I thank. in the control panel after me updating appears the following message: You did not completes all required fields.
You did not completes: count_views
(and these options don't exist for me to change.)
Quote
quote:
It works with Who's Online just fine, as documented in the instructions. If somebody wants to document which hacks it works with and let me know, then that's fine, but I am not running a lot of hacks, so I don't know. I mean it should work with EVERY hack, it might just be a matter of where code needs to be placed in public_forum_page.pl, depending on your board's layout. Also you can look at my board an the stuff I am running, and get a good idea of what things it works with.

[ 11-27-2001 11:08 AM: Message edited by: Slurpee ]
Quote
quote:
You didn't hack CP_VARS_MISC.PL properly. Re-check that part and make sure you did it right, you should have a radio button to the turn the views on and off in Miscellaneous Settings.
Quote
quote:
Have no clue about Hypercells, I don't use it. if someone wants to document it, feel free and I'll throw it in the directions. As far as the Last Reply hack goes, it works fine with that. It's just a matter of where you want to place the $v_counter variable in public_forum_page.pl.
Slurpee can you tell mw how to do the cells like your forums

For example Topic Starter - Replies and Views together and The last post alone

Thanks
I could tell you, but then I'd have to kill you.

It's not complicated, just takes A LOT of patience, and editing of public_forum_page.pl and ubb_forum.cgi in places. There are so many different format changes I made to do that, it would be almost impossible to point them all out.
The basics are just to move variables around in public_forum_page.pl.

[ 11-27-2001 06:00 PM: Message edited by: Slurpee ]
Quote
quote:
You better kill me
works great - we moved it to it's own column.

Take a look: http://www.planethex.com/cgi-bin/ultimatebb.cgi

It's looking good slurpee smile
Slurpie, im using the Who's Online PHP version, (not accelerator tho) and in ubb_forum.cgi where u say replace:

Code
code:

its different for php version...

i have:

Code
code:

what do i change

Thankyou
It works fine with HyperCell 3.0, as is. No need to alter anything.

Thnx Slurpee for a good hack!

Quote
quote:
i just dont get it

I did the hack - several times over, and on the forum topics page i get 2 lots of the page displayed! eg, i get the normal page, then the exact same underneath it!

please help
Quote
quote:
me too having exact the same problem
same for me... all things appear twice on the boards after installing this hack.

I noticed also something... on public_forum_page.pl i don't have what you say on instructions... i have:

Code
code:

what could this be?

BR

Code
quote:</font><hr>Originally posted by hothitradio_com:
i just dont get it <img src="confused.gif" border="0" alt="" />

I did the hack - several times over, and on the forum topics page i get 2 lots of the page displayed! eg, i get the normal page, then the exact same underneath it!

please help
<hr></blockquote>

<blockquote><font size="1" face="Verdana, Helvetica, Arial">code:
hothitrado, dreamer, and darkm:

Look into the file "ubb_forum.cgi".

#### FIND: #######

&processVIEW($ThisHTML);
}
print "$ThisHTML";

#### CHANGE IT TO: ######

&processVIEW($ThisHTML);
}

#### FIND ####

&processVIEWS($_);
}
print;

#### CHANGE IT TO: ######

&processVIEWS($_);
}


[ 12-02-2001 10:46 AM: Message edited by: freeTV ]
Thanks FreeTv

I did what you told me and I dont have this problem anymore .

The new problem is that the counter is not refreshing. I have to clear the cache everytime if I want to see the real number of the counter.

Can you give me any hint?

Also in the readme file of this mod says that If I have installed the whosonline mod I should add some things and some others if I dont have this mod.
I have it installed and I dont get if I have to do this step

Look for this:
print "$ThisHTML";

Replace that with:
if ($vars_misc{count_views} ne 'no') {
&processVIEWS($ThisHTML);
}
Will this hack be made compatible with the accelerator and who's online once most of the bugs are out?
Dreamer,

You have to do that step and comment out (or delete) any print statment immediately below it.
hmm... installed the hack, did what freeTV said a few posts ago (coz i have who's online installed) and its working now, well, kinda!...

It's counting the views, but its counting the wrong topics!!...eg, i goto the 4th topic in a forum, and it adds the count onto the 5th one! confused
looks like you have &processVIEWS($ThisHTML); in the wrong loop.
what do u mean please
Rehack your ubb_forum.cgi
If you can't solve it, send me the file. I'll take a look.
Allen - Really haven't done anything, just have a shared plan from Hosting4less.com. Never a problem, board always run smooth, despite its size. Perhaps I'm just lucky...lol...I doubt it.

I do have some code that will make this work with the accelerator, but until I am comfortable everyone has the non-accelerator version running without problems, I am not going to release the accelerator code. Once the bugs have been fixed, then I will. It does already work with Who's Online, not the PHP version though.

So who is still having problems, I see freeTV has been helping out with some troubleshooting. Who still can't get it working right?

[ 12-04-2001 03:18 PM: Message edited by: Slurpee ]
Sounds cool Slurpee smile
freeTV - i've re-hacked ubb_forum.cgi several times - it still adds the view count onto the wrong topic! i have e-mailed you the file, would u mind taking a look please?

tia, james
Thanks FreeTV for your help. Problem solved
I still have the problem: it's showing the view count in the wrong forum - eg, if you view the 3rd forum its adding the count to the 4th! pls pls help

ty, james
thankyou so much freeTV - i got it working just perfect.

smile
question, is there a bug on line #176 of the instructions with this?:

# delete the counter file
unlink("$vars_config{NonCGIPath}/$exact_path/v_counters/$in{t}.counter.pl");f

Is that f supposed to be on the end of that line?
hmm im not sute either - all i know is it works whether or not its present as the ); cancels it out anyway
Yeah, it seems to work well with the f there
How close is this hack to working with the accelerator?

Before I did my upgrade, I had a hit hack, and I'd really love to have one again when I open up the board again.

I was working on the "hit hack" when I encountered a problem with code, and FreeTV pointed me in this direction.
got this working with no problem. . though i don't like the default style of it; it spaces out threads too much, but that's all matter of preference and it actually inspired me to figure out how to edit public_forum_page.pl and give "views" its' own column! woohoo!

thanks
quote:
Originally posted by actfact:
...and give "views" its' own column! woohoo!
thanks



Can you post the column mod?

Thanks,

-Todd
UBB v6.1.0.3

Good job, Slurpee! This mod works great!

Here's a couple problems I found with the installation procedures.

1. The wordlets mod included with the views package appears to be incomplete. I installed the wordlets mod included with the Who's Online? Beta 2 This one installed flawlessly using ultimatebb_mod_wordlets_install.cgi.

2. The Who's online conflict instructions were incomplete. There were two "print" statements that needed to be commented out in UBB_FORUM.CGI to prevent cached items from being displayed multiple times.

The following 'prints' should be commented out if you have Who's Online installed.

sub get_forum {

...

# get from cache, if it exists...

...

# comment out this print
print;

...

# comment out this print
print "$ThisHTML";

}

Finally, I implemented a column "Views" format. To see the "views" mod in action:

http://www.poetsofzwan.com/cgi-bin/ubb/ultimatebb.cgi
???

I get this: views::

It doesn't count the views.

[ 12-13-2001 02:08 PM: Message edited by: Variables ]
So, can anyone please rearrange all the stuff and move it to the next beta release?
woohoo! done with the column view myself too!

thx a lot!

[ 12-15-2001 08:22 PM: Message edited by: q_ware ]
Nevermind I solved the problem...continue the good work.


Thanks
DOC

[ 12-27-2001 08:47 PM: Message edited by: ::DOC:: ]
for those of you that want the views in a different section/column use this code for the PUBLIC_FORUM_PAGE.PL Template instead.

Find (Note your may defer if you have Last Reply hacked in)
Code
[/code]

Insert After ( Note that where you put this will be the place where a new column will appear I placed it after replies and before last post)
Code
</pre></div></div><br><br><br>Your next step will be to place the data where its suppose to be:<br><br><span style="font-weight: bold">Find</span> (   Note this may be different)<br><div class="ubbcode-block"><div class="ubbcode-header">Code</div><div class="ubbcode-body ubbcode-pre" ><pre>

Insert After ( This must correspond to where you place the column in the step above this)
[code]


You are done..upload the template and if you have to clear you cache.


DOC

[ 12-27-2001 10:16 PM: Message edited by: ::DOC:: ]
works like a charm!
Yes, the Hack works, but I have a question:

I use UBBNews 2.0 hack to. I must switch off the cache to bring the scripts to work´or the news will be stucked old and notrefreshed. I use UBB 6.05 and the news hack a long time and it works with cache. Now I update to 6.1.0.3 and put in several other updated hacks. This view coutner is the ony real new one for me. Anyone who use both hacks without problems ?
Does caching need to be turned off for the views counter to be accurate?

Thanks
Ron
I answered my own question
slurpee does this work with 6.2.1 and phpAccel ?
If not where would I get a hit hack that does ?
thanks
© UBB.Developers