vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   [VB3 RC3] Who viewed this thread? (https://vborg.vbsupport.ru/showthread.php?t=61225)

Kentaurus 02-07-2004 05:26 AM

Quote:

Originally Posted by Boofo
The sorting feature doesn't seem to be working for me. I have me (Boofo) in the list, the next one strats with an M and the next one strats with an A. They are not going alphabetically. ;)

The sort will only work in new threads or threads where the list needs to be updated, if the who viewed is already stored for a thread then it won't be sorted. Call it an insertion sort :) It only sorts when something is added.

I'll check for that username markup, shouldn't be that hard to modify, but keep in mind that a query is needed for that. It is not an update query so it shouldn't hurt a lot the performance but still for people that are trying to mantain queries to a minimum (like me) an extra query might not sound practical.

Kentaurus 02-07-2004 06:04 AM

Here is the first one. For people that already installed the hack and want to add how many users have seen the thread:

In the showthread.php file, this:
Code:

$+++++ad = @implode(", ",$+++++adarray);
Replace it with:
Code:

$+++++ad = @implode(", ",$+++++adarray);
$total+++++ad = @count($+++++adarray);

In the SHOWTHREAD template, this:
Code:

Users that have seen this thread:
Replace it with:
Code:

$total+++++ad users have seen this thread:
Guests are a little more difficult because it means storing ip addreses as well instead of userid's. I'l check if there is an easy way to do it.

Those +++ are the word w h o r e that even if its a substring it is still being censored (/me makes a note on not using variable names that might be censored).

TXT file updated

Boofo 02-07-2004 08:28 AM

Is there any way to run a query to sort the users who have already seen a thread so it can strat off alphabetically from now on?

Can you just use the code in vBulletin for who is browsing this thread now to get the html markup that it is using already? ;)

squawell 02-07-2004 09:18 AM

i got this error when i run scheduled task in my admincp
Code:

Warning: asort() expects parameter 1 to be array, boolean given in C:\Apache Group\Apache2\htdocs\forum\includes\cron\threadviews.php on line 41
the line 41 is
Code:

asort($+++++adarray);
any idea?thankz

edit:delete the line 41 than it works:D

Kentaurus 02-07-2004 06:51 PM

Quote:

Originally Posted by squawell
i got this error when i run scheduled task in my admincp
Code:

Warning: asort() expects parameter 1 to be array, boolean given in C:\Apache Group\Apache2\htdocs\forum\includes\cron\threadviews.php on line 41
the line 41 is
Code:

asort($+++++adarray);
any idea?thankz

edit:delete the line 41 than it works:D

Don't worry about it, it's a warning (it doesn't stop the code from executing), that's because some threads might not have any data to sort. If you really don't want to see the warning change it to this:

Code:

if (is_array($+++++adarray)) {
asort($+++++adarray);
}


Boofo 02-07-2004 07:40 PM

Quote:

Originally Posted by Kentaurus
Here is the first one. For people that already installed the hack and want to add how many users have seen the thread:

In the showthread.php file, this:
Code:

$+++++ad = @implode(", ",$+++++adarray);
Replace it with:
Code:

$+++++ad = @implode(", ",$+++++adarray);
$total+++++ad = @count($+++++adarray);

In the SHOWTHREAD template, this:
Code:

Users that have seen this thread:
Replace it with:
Code:

$total+++++ad users have seen this thread:
Guests are a little more difficult because it means storing ip addreses as well instead of userid's. I'l check if there is an easy way to do it.

Those +++ are the word w h o r e that even if its a substring it is still being censored (/me makes a note on not using variable names that might be censored).

TXT file updated

On guests, maybe just do a guest count?

Kentaurus 02-08-2004 08:01 PM

Here is another update

As requested by Boofo, to make the users appear with the html markup as they appear in the online users and almost anywhere, at the cost of 1 query.

I'm now attaching a txt since I'm getting tired of that censor.....

For threads before I added the sorting piece, just create a new user and view the unsorted thread, it will be sorted.

Boofo 02-08-2004 08:08 PM

That's Boofo, not Boofoo. ;)

And thank you, sir. ;)

Boofo 02-08-2004 08:34 PM

That worked great! Thank you, again. ;)

You forgot to add the space after the comma in this line. The names were all running together. But I fixed it on my site. ;)

PHP Code:

 $+++++ad = @implode(",", $+++++adnames); 


Boofo 02-09-2004 12:57 AM

Now I'm getting nothing but DB errors with this. I emailed you about it.


All times are GMT. The time now is 07:01 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.01461 seconds
  • Memory Usage 1,749KB
  • 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
  • (13)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)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