vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   WebTemplates 3.5.x: VB Integrated CMS (Content Management System) (https://vborg.vbsupport.ru/showthread.php?t=103076)

bulbasnore 01-01-2006 08:09 PM

Well, as Shirley Temple would say*:

OH MY GOODNESS!

I followed the install instructions, then the upgrade. Got a little out of phase because of uploading the files in the wrong spot. Then with fear and trepidation I imported my old templates which make heavy use of external variables.

BOINK!

It just works. Oh wait, looks like I have some work to do on my external variables. Oh well!

Hooray for Logician and happy new year!

*Sorry, I'm an old guy. Watch one of her movies!

bulbasnore 01-01-2006 08:48 PM

Alrighty, here's my problem.

In the old templates I had this in the Outside Variables box of the target template:

formSetNo

Another template POSTS that variable and an integer value to the target via selection from a popup menu.

Following this sample code:

$vbulletin->input->clean_array_gpc('r', array(
'my_variable_1' => TYPE_STR,
'my_variable_2' => TYPE_INT,
));


I have the following in the 3.5 target template:

$vbulletin->input->clean_array_gpc('r', array(
'formSetNo' => TYPE_INT
));


I've also tried it with TYPE_STR.

Anyway, the target template isn't getting the variable. Any suggestions? This is for a major feature of our site!

bulbasnore 01-01-2006 09:15 PM

And here's the fix:

vBulletin wisely forces you to clean inputs. This is explained here:

http://www.vbulletin.com/docs/html/codestandards_gpc :glasses:

For your Webtemplate PHP include, you can collect and clean variables (using an array) or a single variable (using key/value hash pair). I used the latter.

So, my one webtemplate POSTs a variable from a form field called 'formSetNo'.

In the target webtemplate, my php include is:

PHP Code:

$vbulletin->input->clean_gpc('p''formSetNo'TYPE_INT); 

The 'p' indicates to the clean_gpc function to look at the POSTed variable. See the documentation link for dealing with other types of input like GETs and COOKIEs.

To use the value in that variable in my php script in my target webtemplate, I use something like this:

PHP Code:

$colname__Recordset2 =  $vbulletin->GPC['formSetNo']; 

Now $colname_Recordset2, which I use to do work elsewhere in my php code, has the value from the POSTed variable! Yay!

Nice to see that vB has a way to do this and it works with WT :banana:

da prez 01-02-2006 08:10 PM

sheer genius.

thanks logician.

now i just gotta learn how to write queries. :D

b6gm6n 01-04-2006 01:50 AM

I wondered if adding my default style header, navbar & footer wouldnt be more easier... i've read the docs and assumed i could either add my default vb header using : $header either in a 'theme' where it's called into my pages (with styling) or as pages parsed as php, but i does not... whats the trick? i've tried : Included VB Templates...nope, tried a simple theme, no go, also added as php...so frustrating, please help

-b6

Kihon Kata 01-04-2006 02:09 AM

Quote:

Originally Posted by b6gm6n
I wondered if adding my default style header, navbar & footer wouldnt be more easier... i've read the docs and assumed i could either add my default vb header using : $header either in a 'theme' where it's called into my pages (with styling) or as pages parsed as php, but i does not... whats the trick? i've tried : Included VB Templates...nope, tried a simple theme, no go, also added as php...so frustrating, please help

-b6

Same thing for me b6. I have a whole section programmed OUTSIDE my forums(w/ db connectivity) and I did the same thing and nothing. :(

RaceJunkie 01-04-2006 02:33 AM

How do i make this text smaller?

WebTemplate Quick Info Panel for Admins - [CMS by Logician]

Logician 01-04-2006 07:20 AM

Quote:

Originally Posted by b6gm6n
I wondered if adding my default style header, navbar & footer wouldnt be more easier... i've read the docs and assumed i could either add my default vb header using : $header either in a 'theme' where it's called into my pages (with styling) or as pages parsed as php, but i does not... whats the trick? i've tried : Included VB Templates...nope, tried a simple theme, no go, also added as php...so frustrating, please help

I'm not sure if I can follow you on this?

Please check the default themes that comes with the installation. For instance check "Default Basic Theme" theme. It already has "$header" variable in it, and it is displaying your default style header, isn't it? So if you create a theme of your own and put $header in it in the same way "Default Basic Theme" has, it will display your header. It should include all relevant variables like this:

PHP Code:

$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
<
title>Your page title</title>
$headinclude
</head>
<
body>
$header
$navbar

<page content goes here>

<and 
dont forget footer too

On the other hand things are more complicated in PHP parsed webtemplates. If you want to paste content of your header in a PHP parsed webtemplate do it with PHP commands. Eg.

PHP Code:

echo $header

Quote:

How do i make this text smaller? WebTemplate Quick Info Panel for Admins - [CMS by Logician]
It is inside template named "WebTemplates_AdminPanel"

b6gm6n 01-06-2006 01:05 AM

Default Basic Theme? whos got one of those then?
right... my default install came with nothing, i created a simple bbcode page as the instructions told me and it worked, no styling of anykind just text on a white background, great, ...i see i have "No Header/Footer WebTemplates Exist at the moment.." and "No Themes Exist at the moment.."... i did create a theme but still nothing, so...whats the code for this "Default Basic Theme"? and what to call it when im setting it up etc etc, i did hope to see my header, nav and footer with my text also...im i being pushy? :)

-b6

yessir 01-06-2006 04:05 AM

Quote:

Originally Posted by b6gm6n
Default Basic Theme? whos got one of those then?
right... my default install came with nothing, i created a simple bbcode page as the instructions told me and it worked, no styling of anykind just text on a white background, great, ...i see i have "No Header/Footer WebTemplates Exist at the moment.." and "No Themes Exist at the moment.."... i did create a theme but still nothing, so...whats the code for this "Default Basic Theme"? and what to call it when im setting it up etc etc, i did hope to see my header, nav and footer with my text also...im i being pushy? :)

From the install doc.

Quote:

STEP 3- Close your browser, reopen it, relogin to your admin cp and you should to see "Logician's WebTemplates" in the left menu. Expand it and click "Export/Import", then "Upload Webtemplate .XML File", point the file named "webtemplate_export.xml".
(There are 2 XML files, please make sure you import the file named "webtemplate_export.xml")
(This step is to upload default webtemplates and webqueries to your webtemplate system)


All times are GMT. The time now is 04:56 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.01702 seconds
  • Memory Usage 1,761KB
  • 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
  • (4)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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