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)

louis_chypher 07-18-2006 12:01 PM

Quote:

Originally Posted by morrow
I know there are PHP restrictions for using this script. I have a rather simple script that doesn't seam to work. Can someone help me modify it so it can work within webtemplates? I'm not sure if it's possible or not but it would be great if it was!

PHP Code:

$content=file("http://waterdata.usgs.gov/ny/nwis/uv?format=rdb&period=1&site_no=01427510"); 


When I was 'playing' around with your code. I finally figured out that the file() function was not returning anything to be displayed. Even though I could paste the link to get to the page. Perhaps a streaming methood would work?

louis_chypher 07-18-2006 03:52 PM

Any suggestion on how to pass a parameter to a web querry and have it included in the query? Such as an event id.

such as:

SELECT something FROM calendar where id=xxxx

bhxtyrant 07-18-2006 04:43 PM

I'll post this once more since it was bumped to the previous page,I was wondering does webtemplates have a "block" type layout like vBACMPS?and also does it have a place to create menu blocks for certain pages?I love the sound of this CMS over VBA but if it doesnt have those two options i dont think it will suit me.Thanks

morrow 07-18-2006 05:26 PM

Quote:

Originally Posted by louis_chypher
Any suggestion on how to pass a parameter to a web querry and have it included in the query? Such as an event id.

such as:

SELECT something FROM calendar where id=xxxx

THanks for looking into that for me. Hopefully someone will offer up some suggestions.

CyberRanger 07-18-2006 07:42 PM

Quote:

Originally Posted by bhxtyrant
I'll post this once more since it was bumped to the previous page,I was wondering does webtemplates have a "block" type layout like vBACMPS?and also does it have a place to create menu blocks for certain pages?I love the sound of this CMS over VBA but if it doesnt have those two options i dont think it will suit me.Thanks

I think you are comparing apples and oranges. VBA is a portal where you layout your main page. WebTemplates lets you create as many different pages with custom content as you desire while using the vbulletin permissions, etc.

bhxtyrant 07-19-2006 12:45 AM

Quote:

Originally Posted by westpointer
I think you are comparing apples and oranges. VBA is a portal where you layout your main page. WebTemplates lets you create as many different pages with custom content as you desire while using the vbulletin permissions, etc.

Yes i know that but what i meant was to put it simply let you easily create menu's to link all the web template pages together.So for example can i make a menu with "link1,link2,link3" that only displays on the main page and a seperate menu that only appears on other pages with "link4,link5,link6" through the admin panel similar to how VBA does.Or will i have to manually code my own menu's.

tommyxv 07-19-2006 04:24 AM

Is it possible to run a php script inside a webtemplate? Trying to run this script:

PHP Code:

<?php

    
include(dirname(__FILE__)."/language.php");
    include(
dirname(__FILE__)."/lib.php");
    include(
dirname(__FILE__)."/engine_dml.php");
    
    
$x = new DataList;
    if(
$HTTP_POST_VARS["Filter_x"] != ""  || $HTTP_POST_VARS['CSV_x'] != "")
    {
        
// Query used in filters page and CSV output
        
$x->Query "select engine.id as 'Part Number', engine.name as 'Part Name', engine.description as 'Description' from engine";
    }
    else
    {
        
// Query used in table view
        
$x->Query "select engine.id as 'Part Number', engine.name as 'Part Name', engine.description as 'Description' from engine";
    }
    
    
// handle date sorting correctly
    // end of date sorting handler
    
    
$x->DataHeight 150;
    
$x->AllowSelection 0;
    
$x->AllowDelete 1;
    
$x->AllowInsert 1;
    
$x->AllowUpdate 1;
    
$x->AllowFilters 0;
    
$x->AllowSavingFilters 0;
    
$x->AllowSorting 1;
    
$x->AllowNavigation 1;
    
$x->AllowPrinting 1;
    
$x->AllowCSV 0;
    
$x->HideTableView 0;
    
$x->RecordsPerPage 10;
    
$x->QuickSearch 3;
    
$x->QuickSearchText $Translation["quick search"];
    
$x->ScriptFileName "engine_view.php";
    
$x->TableTitle "Partnumber";
    
$x->PrimaryKey "engine.id";
    
$x->ColWidth[] = 150;
    
$x->ColWidth[] = 150;
    
$x->ColWidth[] = 150;
    
$x->Template 'engine_templateTV.html';
    
$x->SelectedTemplate 'engine_templateTVS.html';
    
$x->ShowTableHeader 1;
    
$x->ShowRecordSlots 1;
    
$x->HighlightColor '#FFE4E1';
    
$x->Render();
    
    include(
dirname(__FILE__)."/header.php");
    echo 
$x->HTML;
    include(
dirname(__FILE__)."/footer.php");
?>


louis_chypher 07-19-2006 11:11 AM

Quote:

Originally Posted by tommyxv
Is it possible to run a php script inside a webtemplate? Trying to run this script:

My experience has shown me that it is very possible to run php inside a web template. I did have, at first, a few issues in getting php to run till I viewed the default webtemplate phptest.

tommyxv 07-20-2006 09:50 AM

Any tips on how to get that script to work? I tried to use the phptest as an example.

orphan 07-20-2006 07:54 PM

Hi

My WebTemplates works like a charm now (on v3.6RC2)
So thx alot for a very nice hack

But i have a question that maybe you guys can answer

How do i manage to make a webtemplate connect to another Db (not the forum Db) thrue a "WebQuery" ?

I've tryed to put some php connection code in the "Query PHPInclude Code (Before)" window but that doesn't seem to work (or maybe just my php code doesen work :alien: )

Could someone provide some help please or just point me in the right direction?

Thx


All times are GMT. The time now is 10:10 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.01899 seconds
  • Memory Usage 1,772KB
  • 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
  • (2)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
  • (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