vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Most Edited Templates (https://vborg.vbsupport.ru/showthread.php?t=35515)

Boofo 07-17-2002 12:13 PM

Is there any way to make this so that the listing is in alphabetical order like the main listing? The ones I edit alot are really spread out and it would be easier to go right to the one in the list the same way you do in the main listing. :)

Sadie Frost 01-15-2004 05:27 PM

I know this is an old hack, but I'd like to try and get it working for me in 2.34 - I can't seem to get it to keep track of the number of times edited - the edits and last edited fields always remain at 0.

This is the code I'm using for the update at the moment:

Code:

$DB_site->query("UPDATE template SET templatesetid=$templatesetid,title='$title',template='$template',edits = edits + 1,lastedit=time() WHERE templateid=$templateid");
Any suggestions? Thanks!

Boofo 01-15-2004 07:07 PM

Quote:

Originally Posted by Sadie Frost
I know this is an old hack, but I'd like to try and get it working for me in 2.34 - I can't seem to get it to keep track of the number of times edited - the edits and last edited fields always remain at 0.

This is the code I'm using for the update at the moment:

Code:

$DB_site->query("UPDATE template SET templatesetid=$templatesetid,title='$title',template='$template',edits = edits + 1,lastedit=time() WHERE templateid=$templateid");
Any suggestions? Thanks!

Here's what I was using on vB2 and it worked great for me. It looks almost exactly the same but there is a slight difference. Try it and let me know if it helps.

Code:

  $DB_site->query("UPDATE template SET templatesetid=$templatesetid,title='".addslashes("$title")."',template='".addslashes("$template")."',edits = edits + 1, lastedit='".time()."' WHERE templateid=$templateid");

Sadie Frost 01-15-2004 09:58 PM

Hmm...doesn't seem to be working. Though somehow I have one template listed now correctly, but I can't get any others to work or that one to register more edits.

So I'm not sure if what I had before somehow worked briefly, or if when I changed to your code it briefly displayed correctly. But I can't replicate it using either my or your code. Weird!

Thanks for trying though!

Boofo 01-15-2004 10:05 PM

If you want, I can send you the code I used for this. It is a little different but better than the original hack. I added some features that I use quite a bit. If you're interestd, pm me and I'll get it to you. ;)


All times are GMT. The time now is 03:37 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
  • Page Generation 0.02513 seconds
  • Memory Usage 1,726KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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