Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 06-27-2002, 02:52 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Help with templates...

Can anyone please help me with my templates problem? I did the upgrade from 2.2.5 to 2.2.6 patch, (3 files) and I am still having problems with the templates not all showing. I have included a picture of what my templates listing looks like fully expanded.
Attached Images
File Type: gif template.gif (10.8 KB, 0 views)
Reply With Quote
  #2  
Old 06-27-2002, 05:32 AM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you have hacked the template file, see if you have this query:
PHP Code:
$templates=$DB_site->query("SELECT t1.title,t2.templateid,t2.title,NOT ISNULL(t2.templateid) AS found".iif(isset($searchstring),",INSTR(t1.template,'".addslashes($searchstring)."') AS globalcontain,INSTR(t2.template,'".addslashes($searchstring)."') AS localcontain","")." FROM template AS t1 LEFT JOIN template AS t2 ON (t1.title=t2.title AND t2.templatesetid=$templateset[templatesetid]) WHERE t1.templatesetid=-1 AND t1.title<>'options' ORDER BY t1.title"); 
If you do, replace it with this one:
PHP Code:
$templates=$DB_site->query("SELECT t1.title AS title,t2.templateid, NOT ISNULL(t2.templateid) AS found" iif(isset($searchstring), ",INSTR(t1.template,'".addslashes($searchstring)."') AS globalcontain,INSTR(t2.template,'".addslashes($searchstring)."') AS localcontain","")."
                                FROM template AS t1
                                LEFT JOIN template AS t2 ON (t1.title=t2.title AND t2.templatesetid=
$templateset[templatesetid])
                                WHERE t1.templatesetid=-1 AND t1.title<>'options'
                                ORDER BY t1.title"
); 
I ran into the same problem when I copied a hack into the upgrad file. That fixed it. Of course, you may have a completely different issue.
Reply With Quote
  #3  
Old 06-27-2002, 06:20 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For testing purposes I applied the fix to my localhost and it didnt correct the problems regarding new PHP version here either. I then upgraded to v.2.2.6 and it's ok now. Also changing the settings in php.ini file helps but of course since we are talking about your site here which is hosted remotely, this is not an option for you.

Buttom line is, fix does not always work, IMO your best bet is to upgrade to v.2.2.6..
Reply With Quote
  #4  
Old 06-28-2002, 10:40 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

FWC,

That did the trick. Thank you very much!

Do you have any idea what the hack is that was in that code that was messing things up? I've got over 100 installed and have no idea which one it would be.

Quote:
Originally posted by FWC
I ran into the same problem when I copied a hack into the upgrad file. That fixed it. Of course, you may have a completely different issue.
Reply With Quote
  #5  
Old 06-29-2002, 12:09 AM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Boofo
FWC,

That did the trick. Thank you very much!

Do you have any idea what the hack is that was in that code that was messing things up? I've got over 100 installed and have no idea which one it would be.

That's great! I think it's the one that makes the custom templates behave like the default templates in the template listing with grouping and expansion and contraction. That query is in the middle of it. If you copy the hack over from your old files you get the pre-4.2.1 query. So, we just replaced that part with the current query.
Reply With Quote
  #6  
Old 06-29-2002, 02:33 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, whatever it was, you IS the man! (Or is that supposed to be...you BEES the man?)

So, basically then, what was in there before I moved it to the new template.php and messed it up was supposed to be there for version 2.2.5 and was changed to what it is now for 2.2.6, right? Ah-ha, now it makes a little more sense.

Thanks again for saving me a lot of grief from having to re-install everything.
Reply With Quote
  #7  
Old 06-29-2002, 06:16 PM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No problem. Glad to help.
Reply With Quote
  #8  
Old 06-29-2002, 06:19 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

FWC,

Maybe you can help me with this. Have you had any strange goings on with the user.php file, too?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:25 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04916 seconds
  • Memory Usage 2,255KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (1)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete