Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #11  
Old 03-14-2006, 01:35 AM
Bhuwan's Avatar
Bhuwan Bhuwan is offline
 
Join Date: Jul 2004
Location: USA
Posts: 425
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by merk
You cant have the # character in a query string. It is a delimiter that the browser uses to scroll.
That's one of the reasons why I am attempting to use an external script
that and the fact htat I don't want 20 rewrites :-)

There must be a way to handle this externally? I've done it but the Phrases don't seem to show up....

Any takers?

This is how I'm going to showthread.pph script from myscript.php
PHP Code:
  require_once('./global.php');
global 
$vbulletin;
 
$vbulletin->input->clean_gpc('r''goto'TYPE_STR);
 
// doing showthread.php?t=X&goto=newpost
  
$vbulletin->GPC['goto'] = 'newpost';
  
$threadid = <some real threadid here is placed as a test>;
  require_once(
'./showthread.php');
exit; 
Now -- it does work, except the PHRASES are not there (at leas tnot all of them). Only guess I've had is that global.php is being executed too early..

Any takers? Please!! :banana:
Reply With Quote
  #12  
Old 03-14-2006, 02:53 AM
merk merk is offline
 
Join Date: Nov 2001
Location: Canberra, Australia
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why are you calling anything prior to the showthread script?
Reply With Quote
  #13  
Old 03-15-2006, 10:25 AM
Bhuwan's Avatar
Bhuwan Bhuwan is offline
 
Join Date: Jul 2004
Location: USA
Posts: 425
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by merk
Why are you calling anything prior to the showthread script?
I wanna run everythig through myscript.php using mod rewrites (for SEO). Hence the reason
Come on! Someone must have the answer!
Reply With Quote
  #14  
Old 03-15-2006, 11:19 AM
Akex Akex is offline
 
Join Date: Jul 2003
Location: France
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have to set up this also in the script which calls showthread

PHP Code:
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();
 
// get special data templates from the datastore
$specialtemplates = array();
 
// pre-cache templates used by all actions
$globaltemplates = array();
 
// pre-cache templates used by specific actions
$actiontemplates = array(); 
Why ? Because, this need to be setup before global.php is calling. As it's written in your script, you call global.php (require_once mean called once and no more ...) but showthread.php won't call it (as it was already called) ... and $globaltemplates, $phrasegroups etc. won't be loaded.
Reply With Quote
  #15  
Old 03-15-2006, 03:25 PM
The Geek's Avatar
The Geek The Geek is offline
 
Join Date: Sep 2003
Location: Behind you
Posts: 2,779
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try NOT including global in your header.
However that means you will need to cleanse your $_REQUEST variables manually.

Not sure if it will work, but it may. Saying that, its still kind of clunky

You may be better off using the global_start hook to include your code. Reason being that all your URLs will have to point to the same script which will simply encase each page.

Go with the global_start hook it will work for you in the long run.

HTHs
Reply With Quote
  #16  
Old 03-15-2006, 10:41 PM
merk merk is offline
 
Join Date: Nov 2001
Location: Canberra, Australia
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I still see no reason why mod_rewrite wont work - the # character has nothing to do with server processing.
Reply With Quote
  #17  
Old 03-16-2006, 12:17 AM
Bhuwan's Avatar
Bhuwan Bhuwan is offline
 
Join Date: Jul 2004
Location: USA
Posts: 425
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Akex
You have to set up this also in the script which calls showthread

PHP Code:
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();
 
// get special data templates from the datastore
$specialtemplates = array();
 
// pre-cache templates used by all actions
$globaltemplates = array();
 
// pre-cache templates used by specific actions
$actiontemplates = array(); 
Why ? Because, this need to be setup before global.php is calling. As it's written in your script, you call global.php (require_once mean called once and no more ...) but showthread.php won't call it (as it was already called) ... and $globaltemplates, $phrasegroups etc. won't be loaded.
Already thought of that but it didn't work Thanks tho!

Quote:
Originally Posted by The Geek
Try NOT including global in your header.
However that means you will need to cleanse your $_REQUEST variables manually.

Not sure if it will work, but it may. Saying that, its still kind of clunky

You may be better off using the global_start hook to include your code. Reason being that all your URLs will have to point to the same script which will simply encase each page.

Go with the global_start hook it will work for you in the long run.

HTHs
That actually worked . I suppose it is ok that i have to clean the variables myself; better than nothing ! :banana: thx
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 02:53 AM.


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.06407 seconds
  • Memory Usage 2,231KB
  • Queries Executed 11 (?)
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
  • (3)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete