View Single Post
  #7  
Old 08-16-2004, 08:43 PM
Ocean's Avatar
Ocean Ocean is offline
 
Join Date: Mar 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Colin F

Try something like this if you want to do it with a link:

<snip>

Add a phrase for redirect_resetviewcounter.

I think that should do it
Colin, you are the best! That worked perfectly. I found that since I have redirects turned off on my board, the added phrase was irrelevant, and I used the default "redirecting" phrase.


Now, when you helped me with the first stage of my modification, I posted this question seperately because I didn't want to assume that you were interested in continuing to help me. But here we are, together again for step two (did I already thank you? ).

That being the case, I have one last step remaining - and I figure I might as well ask you since you've stuck with me this far... <grin> But if you're not interested, just say so, and I'll happily make it a seperate post.




The last thing I want to do, is to add another field to the "thread" table, which will store the date and time that the Reset Counter link we just added was last clicked. So, the chart of what I need is this:


1. I need to create a new field that will store the date and time for each thread that the counter was reset. When I created the first "whoviewedcounter" field, I did so with this query:

ALTER TABLE thread ADD whoviewedcounter TEXT NOT NULL;

However, I'm not sure what the query would be to add the proper field (let's call it "whoviewedreset") type we would need to store this information.


2. I need to be able to access the date/time so that I can insert it into the ShowThread template - I don't know if it would be in the format of "$vbphrase[whoviewedreset]", or if it's not that simple. Needless to say, I'm not sure what the best way to do this is.


3. If there is no date/time stored for a particular thread, I would imagine that the phrase should show as "Never".


4. When I click on the "Reset Counter" link we just worked on, the script in Misc.php should also update the date/time in the "whoviewedreset" field of that thread.



Whew! That seems like a lot more than it really is, I would imagine. But in any case, if you feel like helping me work this last part out, it would be greatly appreciated! If not, that's okay too. You've been more than generous so far, and I am extremely grateful for the assistance you have already given me.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01172 seconds
  • Memory Usage 1,768KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete