Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 4 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[HOW TO - vB4] Create a own vBulletin page (without plugin and php file)
Allan's Avatar
Allan
Join Date: Jun 2003
Posts: 1,513

 

France
Show Printable Version Email this Page Subscription
Allan Allan is offline 11-29-2009, 10:00 PM

Here is a trick that allows you to create vBulletin pages without plugin or php files.
  • Create one template named "custom_wazaaaa", add in:
PHP Code:
{vb:stylevar htmldoctype}
<
html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
  <
head>
    <
title>{vb:raw vboptions.bbtitle}</title>
    {
vb:raw headinclude}
  </
head>
  <
body>
    
    {
vb:raw header}
    
    {
vb:raw navbar}
    
    <
div id="pagetitle">
      <
h1>{vb:raw pagetitle}</h1>
    </
div>
    
    <
h2 class="blockhead">Titre de la page (title page)</h2>
    <
div class="blockbody">
      <
div class="blockrow">
        
Le texte que vous souhaitez mettre (the text)
      </
div>
    </
div>
    
    {
vb:raw footer}
  </
body>
</
html
  • It'll just create a link to this url: /forum/misc.php?do=page&template=wazaaa
  • The template MUST be named custom_xxxxxx - change xxxxxx to whatever you want.
  • When call the page, you enter template=xxxxxx where xxxxxx is the part of the template name after custom_
PS: You are free to customize the text in the template
Attached Images
File Type: jpg template vB4.jpg (43.7 KB, 0 views)
Reply With Quote
  #12  
Old 12-03-2009, 08:20 PM
niake niake is offline
 
Join Date: Oct 2003
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

:up: Thanks
Reply With Quote
  #13  
Old 12-09-2009, 11:43 AM
betty02 betty02 is offline
 
Join Date: May 2005
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I created a new nav link to my custom page, how do i make that link selected/highlighted as if its on that page? Currently keeps my Forum tab highlighted/selected?
Reply With Quote
  #14  
Old 12-09-2009, 12:45 PM
Dave-ahfb Dave-ahfb is offline
 
Join Date: Mar 2002
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was thinking this might make an easier way to integrate my current php scripts, using this article to create header and footer templates. I should have known somehow some way things would screw up, it just seemed to easy.
PHP Code:
<?php
include_once('/home/ahfb/public_html/ahfb2000.com/public/4test/misc.php?do=page&template=css2header');
?>

Gives me the error
Quote:
Warning: include_once(/home/ahfb/public_html/ahfb2000.com/public/4test/misc.php?do=page&template=css2header) [function.include-once]: failed to open stream: No such file or directory in /home/ahfb/public_html/ahfb2000.com/public/4test/cssgenerator2.php on line 2

Warning: include_once() [function.include]: Failed opening '/home/ahfb/public_html/ahfb2000.com/public/4test/misc.php?do=page&template=css2header' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/ahfb/public_html/ahfb2000.com/public/4test/cssgenerator2.php on line 2
Not being a programmer, my guess is that .......I am clueless


UPDATE

I found that due to the variables
(/home/ahfb/public_html/ahfb2000.com/public/4test/misc.php?do=page&template=css2header will not work, it must be done with the url
Code:
include('http://www.ahfb2000.com/4test/misc.php?do=page&template=css2header');
which leads to error "URL file-access is disabled in the server configuration " in addition to the previous errors. To solve this you are supposed to change php.ini to read

allow_url_fopen = On
and
Allow_url_include = On

Still have all 3 errors ...hmmm


oops, forgot to reload apache, now my errors are
Quote:
Warning: include(http://www.ahfb2000.com/4test/misc.p...ate=css2header) [function.include]: failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required in [path]/cssgenerator2.php on line 3

Warning: include() [function.include]: Failed opening 'http://www.ahfb2000.com/4test/misc.php?do=page&template=css2header' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in [path]/cssgenerator2.php on line 3
Reply With Quote
  #15  
Old 12-09-2009, 01:33 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by betty02 View Post
I created a new nav link to my custom page, how do i make that link selected/highlighted as if its on that page? Currently keeps my Forum tab highlighted/selected?
For the condition used for the tab, did you try this?
PHP Code:
if (THIS_SCRIPT == 'misc'
or, you may have to do:
PHP Code:
if (THIS_SCRIPT == 'misc' AND $_REQUEST['template'] == 'whatever'
Something like that should work. Play with it.

Quote:
Originally Posted by Dave-ahfb View Post
I was thinking this might make an easier way to integrate my current php scripts, using this article to create header and footer templates. I should have known somehow some way things would screw up, it just seemed to easy.
.....

Not being a programmer, my guess is that .......I am clueless
Exactly what are you trying to do? You don't want to include the whole misc.php page in another script. Where are you adding the php code to include the misc.php page? If you have other php pages already, you probably would do better following this - [HOW TO - vB4] Create a own vBulletin page
Reply With Quote
  #16  
Old 12-09-2009, 01:35 PM
Dave-ahfb Dave-ahfb is offline
 
Join Date: Mar 2002
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

update..again
removing the htaccess, now it works perfect!!

Problem is how can I have a secret hidden test folder to get everything setup

--------------- Added [DATE]1260373985[/DATE] at [TIME]1260373985[/TIME] ---------------

Lynne,

I used your tutorial on my static pages, it is very well writtin and was easy to follow, worked a charm . On my scripts, well that is a different issue. I read 3 or 4 different tutorials and just could not get my pea-brain wrapped around the concept. Once this one was published I knew that though it may not be the optimal method to use, I could probably make it suit my needs.

Yes, it does have downfalls, I must either go live and do the work on the live pages without htaccess or find a way for the include to send the htpasswd (thinking it can be done but have not investigated yet). The biggest possible downfall is potential security issues having Allow_url_fopen and Allow_url_include = On. I have read there could be issues but have not read what these issues could be. Is it possible you could enlighten me to these issues and any others I may not be aware of?

thanks
Reply With Quote
  #17  
Old 12-09-2009, 02:22 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dave-ahfb View Post
Yes, it does have downfalls, I must either go live and do the work on the live pages without htaccess or find a way for the include to send the htpasswd (thinking it can be done but have not investigated yet). The biggest possible downfall is potential security issues having Allow_url_fopen and Allow_url_include = On. I have read there could be issues but have not read what these issues could be. Is it possible you could enlighten me to these issues and any others I may not be aware of?

thanks
You should probably post that sort of question out in the general forums. I'm really not a security expert (I know just enough for my little site!), but there are some server guys around who could probably answer your question.
Reply With Quote
  #18  
Old 12-09-2009, 03:25 PM
Dave-ahfb Dave-ahfb is offline
 
Join Date: Mar 2002
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am about to give up, using my method the login does not work. Lynne, this particular script I am working on is a very simple proprietary tool. I hate to post this here for help as there are many attempts on the net to copy it. Do you mind if I pm you?
Reply With Quote
  #19  
Old 12-13-2009, 08:47 PM
Adem GEN?'s Avatar
Adem GEN? Adem GEN? is offline
 
Join Date: Apr 2005
Location: İstanbul / T?rkiye
Posts: 377
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For Privacy Policy the very good :up:
Thank you very much
Reply With Quote
  #20  
Old 12-14-2009, 07:45 PM
Ted Clore Ted Clore is offline
 
Join Date: Apr 2007
Location: Michigan
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've read and reread this article and completely do not understand it. Could someone give a step by step and explain things for a neophyte like myself. I am trying to wrap my site pages with vB headers, footers and widgets, and I think this is what this is supposed to do.

Any help is appreciated. Thank you.
Reply With Quote
  #21  
Old 12-15-2009, 04:02 AM
nubian nubian is offline
 
Join Date: Nov 2004
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any way to make these URL friendly?
Like mydomain.com/aboutus ?
Reply With Quote
Reply


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 10:49 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.06413 seconds
  • Memory Usage 2,350KB
  • Queries Executed 26 (?)
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)bbcode_code
  • (4)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (3)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete