vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Create your own vBulletin page (https://vborg.vbsupport.ru/showthread.php?t=228112)

kh99 12-08-2011 03:12 AM

I guess it wasn't cookies then - it was just a thought.

Rocket2009 12-08-2011 03:46 PM

Thanks for the try:

As Lynne suggested, I tried adding:

Code:

<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
near the top of my template. When the page is rendered and I view the page source it gets implemented as:

Code:

<input type="hidden" name="securitytoken" value="guest" />
And consistent with not being properly logged in on this page I see the following in the page source.

Code:

<script type="text/javascript">
<!--
        var SESSIONURL = "";
        var SECURITYTOKEN = "guest";
        var IMGDIR_MISC = "images/misc";
        var IMGDIR_BUTTON = "images/buttons";
        var vb_disable_ajax = parseInt("0", 10);
        var SIMPLEVERSION = "418";
        var BBURL = "http://www.touringmotorgliders.org";
        var LOGGEDIN = 0 > 0 ? true : false;
        var THIS_SCRIPT = "knowledgebase";
        var RELPATH = "kb/knowledgebase.php";
        var PATHS = {
                forum : "",
                cms  : "",
                blog  : ""
        };
        var AJAXBASEURL = "http://www.touringmotorgliders.org/kb/";
// -->
</script>

I am still looking for that command to put into the code (index.php of KBPublisher, knowledgebase.php, or my template) to get me logged into the vBulletin system.

Lynne 12-08-2011 04:16 PM

If it isn't recognizing you, then the global.php file isn't getting called/included correctly.

Rocket2009 12-08-2011 05:11 PM

Yes, I agree that I am having trouble getting global.php called correctly through this rendering system.

I have tried adding

Code:

chdir ('/home/touring7/public_html/');
require_once('./global.php');

to /kb/index.php
to /kb/knowledgebase.php
and directly to the template in my style called KBPublisher (if you are following my earlier post)

and I have had no luck.

If I just load knowledgebase.php at the browser, I am logged in fine.

As you recall from earlier post, kb/index.php calls /kb/knowledgebase.php as a kb template which then calls the vB template KBPublisher. Everything displays as expected but I am not logged in.

I even tried defining a tag called {global_load} to try and insert an additional call to global.php by inserting the php code to no avail.

Two ideas:

(1) Do I need to 'register' a page such as /kb/index.php?

(2) Perhaps I could call global.php at /kb/index.php to define security tokens and etc and then pass that code via a tag to the vbulletin template via the /kb/index.php rendering system. Suggestions for what form that code should take?

Please help me get the global.php called and working correctly.

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

I am continuing to experiment and I might be close, if I can get some help:

In the /kb/input.php I place the following code:

Code:

$curdir = getcwd ();
chdir('/home/touring7/public_html/');
require_once('./global.php');
chdir ($curdir);
.
.
.

$page->assign('global_load',$vbulletin->userinfo['securitytoken']);

I have a tag I created in my template called {global_load} which renders the page correctly but on top of the page it prints out the security token obtained from the global call /kb/index.php. So this verifies that I can pass a global variable (security token) through the rendering process.

Can someone suggest a way I can get that rendered page to accept the security token so it will see me as logged in?

Thanks.

Easy5s.net 12-12-2011 07:44 AM

PHP Code:

<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT''premade');

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

?>

and error:

Unable to add cookies, header already sent.
File: premade.php
Line: 1

:confused:

Lynne 12-12-2011 04:46 PM

Quote:

Originally Posted by Easy5s.net (Post 2277007)
PHP Code:

<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT''premade');

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

?>

and error:

Unable to add cookies, header already sent.
File: premade.php
Line: 1

:confused:

That isn't going to work. You need to follow the tutorial.

JimxJNM 12-21-2011 07:18 AM

This is Great man Thanks for the Lynne :D i will try this out,

Papa Bear 12-24-2011 11:19 PM

Excellent..Works great.

Okuma Steve 12-30-2011 03:32 AM

I am having a small problem and want to see if anyone can assist me.

I am trying to create a list with HTML and it isn't recognizing it, any ideas?

Here is a sample of what I am putting in:

<ul>
<li> item name </li>
<li> item name </li>
</ul>

I used the same code in making a new faq item and it worked fine, but not working in this form.

Link to faq item:

http://www.theoutdoorstrader.com/faq.php?faq=supporter

Link to new form:

http://www.theoutdoorstrader.com/supporter.php

HMBeaty 12-30-2011 04:10 AM

You need to make the css for ul and li ;)


All times are GMT. The time now is 09:41 AM.

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.02154 seconds
  • Memory Usage 1,754KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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