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)
-   -   Who Viewed This Thread - Enhanced Version (https://vborg.vbsupport.ru/showthread.php?t=68876)

nando415 09-01-2004 02:20 PM

yeah...I only want it to show up in certain subforums, more then 1....anyway to do that?

Ocean 09-01-2004 06:23 PM

Quote:

Originally Posted by nando415

yeah...I only want it to show up in certain subforums, more then 1....anyway to do that?

Absolutely. I should be able to post the code later today or tomorrow. :)

Ocean 09-02-2004 12:09 PM

Okay, if you want this hack to only work for certain Forums/Subboards, than there are two steps you need to perform:


Step 1

In the ShowThread.php file, you are supposed to insert a section of code (from the hack instructions). What you need to do is to add the following code first (in the spot indicated by the hack instructions). Then, follow the instructions given in the commented section of the following code. Finally, add the section of code from the hack instructions where indicated below.

PHP Code:

 
 
/*
In the following section of code, insert the Forum IDs of the forums that you want this hack to work for. Each Forum ID needs to be surrounded by single-quotes ( ' ), and all but the last one needs to have a comma after each entry. In the following code, Forums 6 and 7 have been specified. Change this to suit your needs.
*/
$whoviewed_selective_forums = array( 
    
'6'
    
'7' 
); 
 
 
if (
in_array($foruminfo['forumid'], $whoviewed_selective_forums)) 
{
        
$show_whoviewed true
 
 
// Insert code from hack instructions right below this line
 
 
 
 
}
 
else 
{
        
$show_whoviewed false




Step 2

In the ShowThread Template, you are also supposed to insert a section of code (from the hack instructions). What you need to do is to add the following code first (in the spot indicated by the hack instructions). Then, add the section of code from the hack instructions where indicated below.


Code:


 
<if condition="$show_whoviewed">
 
 
<!-- Insert Code from hack instructions right below this line -->
 
 
 
 
</if>



And that should do it!

mtha 09-02-2004 03:18 PM

I get this error when trying to Reset Counter

" Could not find phrase 'redirect'. "

Ocean 09-02-2004 03:49 PM

Quote:

Originally Posted by mtha

I get this error when trying to Reset Counter

" Could not find phrase 'redirect'. "

I would double check the code you pasted into the Misc.php file. That code references the phrase "redirecting", not "redirect" - so it might be that the code didn't get inserted properly.

Ocean 09-03-2004 12:28 PM

I have just released v1.2.1 of this hack.

Anyone who has successfully installed v1.2, doesn't need to do anything. The changes were all related to upgrading from Gary's original version.

I released an upgrade script that would convert the data from the old format to the new - so anyone who hasn't installed this yet because you don't want to lose your current WhoViwed data, can now do so with no worries. :)


Upgrade instructions are included in the Instructions file.

CHT 09-05-2004 11:59 PM

can you plz be so kind and change the way it shows the stats ?!
I mean the load-time is much higher if 1000+ members viewed a thread..

a much better way would be doing it via POP-UP...
When u view a Forum you can see the Views and replies of the Topic... The Number of Replies leads to a POP-UP where u have short and clear listed who viewed the topic...

(its and integrated vb-feature)... but the number of views isnt hotlinked..
so why not hotlink it too and make it redirect to a pop up which dispalys the content of ya hack..!!

I hope u got what i mean and would be very cool if u release it..!!
Much eazier to handle then..!!

Thhnx and respect ;)

Ocean 09-06-2004 02:07 PM

Quote:

Originally Posted by CHT

can you plz be so kind and change the way it shows the stats ?!
I mean the load-time is much higher if 1000+ members viewed a thread..

a much better way would be doing it via POP-UP...
When u view a Forum you can see the Views and replies of the Topic... The Number of Replies leads to a POP-UP where u have short and clear listed who viewed the topic...

Actually, that link leads to a list of who has posted in that thread, not who has viewed it. :)


Quote:

Originally Posted by CHT

(its and integrated vb-feature)... but the number of views isnt hotlinked..
so why not hotlink it too and make it redirect to a pop up which dispalys the content of ya hack..!!

I hope u got what i mean and would be very cool if u release it..!!
Much eazier to handle then..!!

Thhnx and respect ;)

Doing that would actually make things much less efficient, in so far as Admin actions are concerned. Usually, you need to know who viewed a thread once you're in it. To have to back out and click a link is a bit counterproductive.

Now, what I might do for a future version is offer an option whereby there will be a link within the thread that you could click in order to bring up the popup. If I did that, I might also add the View number hyperlink in addition.


I'll consider it for a future version. :)

Sinbad2uk 09-08-2004 07:56 AM

Sorry for being a bit of a dummy, but how and where do I run these queries

1. Run the following SQL Queries (Adjust accordingly, if you use Table Prefixes):

**********

ALTER TABLE thread ADD whoviewed TEXT NOT NULL;
ALTER TABLE thread ADD whoviewedcounter TEXT NOT NULL;
ALTER TABLE thread ADD whoviewedreset INT(10) UNSIGNED NOT NULL;

I am very new to this and do not really understand what this means

Ocean 09-08-2004 10:30 AM

Quote:

Originally Posted by Sinbad2uk

Sorry for being a bit of a dummy, but how and where do I run these queries

1. Run the following SQL Queries (Adjust accordingly, if you use Table Prefixes):

**********


ALTER TABLE thread ADD whoviewed TEXT NOT NULL;
ALTER TABLE thread ADD whoviewedcounter TEXT NOT NULL;
ALTER TABLE thread ADD whoviewedreset INT(10) UNSIGNED NOT NULL;


I am very new to this and do not really understand what this means

SQL Queries can be run from Admin CP/Import & Maintenance/Execute SQL Query.

However, in order to run SQL Queries, your Config.php file has to have been configured to allow your User ID to run them - since SQL Queries can cause a lot of damage if not used properly. :)


All times are GMT. The time now is 09:14 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.01133 seconds
  • Memory Usage 1,751KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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