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

barryhand 07-22-2006 04:06 PM

if you use a php redirect on the site root www.site.com and have the forums installed at www.site.com/forums

You can't login, as it's looking for www.site.com/forums/ files

any help ? (apart from doing a refresh redirect)

rollo tamasi 07-22-2006 06:56 PM

Hi, I installed this mod this evening. Everthing went smooth and then i went to test it by going to the view.php?pg=test and view.php?pg=test2 page but nothing showed up.

I then setup an aboutus page and went to view.php?pg=aboutus and the same thing happened once more.

I uploaded all the files into the correct path and uploaded the product web templates xml file.

Any ideas what could be wrong?

orphan 07-23-2006 04:03 AM

Quote:

Originally Posted by rollo tamasi
Hi, I installed this mod this evening. Everthing went smooth and then i went to test it by going to the view.php?pg=test and view.php?pg=test2 page but nothing showed up.

I then setup an aboutus page and went to view.php?pg=aboutus and the same thing happened once more.

I uploaded all the files into the correct path and uploaded the product web templates xml file.

Any ideas what could be wrong?

SEO Friendly URLs on?

The-Ensemble 07-23-2006 05:40 PM

I installed this mod and i installed it correctly everything is in the right places. the thing doesnt show up in the admincp, i logged out, i turned the internet off i even restarted my computer and still no change, its no there.
Whats wrong?

morrow 07-24-2006 01:49 AM

Quote:

Originally Posted by The-Ensemble
i turned the internet off i even restarted my computer and still no change, its no there.
Whats wrong?

Can you please not turn the internet off again. When you did that, you took everyone down and it really wasn't fair to the rest of us here who aren't having the same issue you're having.

I would go back and read the instructions again. It seams to me that you left something out. If you add/replace anything, remember what I asked of you. If you turn the internet off again, nobody is going to be able to help you.

Bubble #5 07-24-2006 02:06 AM

Quote:

Originally Posted by The-Ensemble
i turned the internet off

Man, that must be one-hell-of-a-large-switch that you're using :bunny:

barryhand 07-25-2006 08:25 AM

I want to display some information from a user's profile on the template page.

What code can I use, I want to show their customfields (if they have them)

barryhand 07-25-2006 12:28 PM

Another question, I have a query to show the last 10 threads from any forum with the title of the thread, the poster and the date. I want to add in the forum that it was posted in.

E.g
Forum - Thread Title - Poster - Time.

Do i need to query 2 tables for this, how ?

Here's the code i have already
Quote:

SELECT threadid, title, postusername,postuserid,dateline
FROM " . TABLE_PREFIX . "thread
WHERE sticky=0 AND visible=1
ORDER BY dateline DESC
LIMIT 10

webgroup 07-26-2006 03:18 AM

Hi, I have noticed that after installing the hack, now my forum is not displaying characters like ñ á á é.

They appear fine if you post in advanced mode, the problem only affects the quick mode.

Any help?

Thanks!!

louis_chypher 07-26-2006 11:41 AM

Quote:

Originally Posted by barryhand
Another question, I have a query to show the last 10 threads from any forum with the title of the thread, the poster and the date. I want to add in the forum that it was posted in.

E.g
Forum - Thread Title - Poster - Time.

Do i need to query 2 tables for this, how ?

Here's the code i have already

Two tables, yes. Thread table and forum table

Code:

SELECT " . TABLE_PREFIX . "thread.threadid AS threadid, " . TABLE_PREFIX . "thread.title AS title, " . TABLE_PREFIX . "thread.postusername AS postusername," . TABLE_PREFIX . "thread.postuserid AS postuserid," . TABLE_PREFIX . "thread.dateline AS dateline," . TABLE_PREFIX . "forum.description AS description 
FROM " . TABLE_PREFIX . "thread LEFT JOIN " . TABLE_PREFIX . "forum ON " . TABLE_PREFIX . "thread.forumid=" . TABLE_PREFIX . "forum.forumid
WHERE " . TABLE_PREFIX . "thread.sticky=0 AND " . TABLE_PREFIX . "thread.visible=1
ORDER BY dateline DESC
LIMIT 10

I tried the above in a query window not using " . TABLE_PREFIX . ", so, you might find an error in my pasting of the " . TABLE_PREFIX . " into the sql statement.

louis_chypher 07-26-2006 11:46 AM

Quote:

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

Notice that phptest does not have the php tags?

I, at first, tried to use the "<?php" "?>" to only have the code not run. When I modeled my php code after the testphp template things ran well.

barryhand 07-26-2006 04:13 PM

Thanks, thats brilliant louis_chypher.

Is it also possible todo 3 tables?

diretur 07-26-2006 08:16 PM

this hack is great!

How can I add a template category? I have "Your Custom Pages" and "Default WebTemplates", but I'd like to add a new category in order to make a new WQ_webtemplateslist.

Thanks in advance

Nick0r 07-28-2006 09:58 PM

Hiya guys,

I'm using a custom template to display my navigation at the top of my site - and it's called using a custom variable, call it $foo.

In order to highlight the active page I do an if condition check for THIS_SCRIPT. I've set THIS_SCRIPT using the phpinclude section of each webtemplate so that each one can have a seperate THIS_SCRIPT definition.

Now - when I try to get it to work, the if condition works within the logician webtemplate, but not within my navigational webtemplate, called by my custom variable.

Any ideas?

ronoxQ 07-29-2006 01:48 AM

When I made my first test template, basically all I did was add the word "test."

However, it did NOT style itself to look like my vBulletin site.

What am I doing wrong?

Logician 08-02-2006 10:59 AM

Quote:

Originally Posted by diretur
this hack is great!

How can I add a template category? I have "Your Custom Pages" and "Default WebTemplates", but I'd like to add a new category in order to make a new WQ_webtemplateslist.

Thanks in advance

Edit includes/wt_include.php section named "// WEBTEMPLATE CATEGORIES" (You'll see detailed info there)

Logician 08-02-2006 11:01 AM

Quote:

Originally Posted by ronoxQ
When I made my first test template, basically all I did was add the word "test."

However, it did NOT style itself to look like my vBulletin site.

What am I doing wrong?

Make sure you set a "theme" for your webtemplate. Do not make it use "no parent webtemplate" in theme section if you want vb style. Also make sure you set webtemplate header/footer correctly.

Razasharp 08-03-2006 11:54 PM

Hi Sinan, hope you are well :)

I've noticed a few people saying WTs is working fine on their 3.6 installations, but am waiting for the offcial green light from you before I upgrade... any idea when you might be able to look into it and give it the all clear if you do?

Thanks! And keep up the good work :)

Kihon Kata 08-04-2006 02:17 PM

Quote:

Originally Posted by Razasharp
Hi Sinan, hope you are well :)

I've noticed a few people saying WTs is working fine on their 3.6 installations, but am waiting for the offcial green light from you before I upgrade... any idea when you might be able to look into it and give it the all clear if you do?

Thanks! And keep up the good work :)

I am running 3.6 gold right here. That site, runs COMPLETELY on WebTemplates for vb 3.5.x

Razasharp 08-04-2006 04:15 PM

Hi Kihon - thats great stuff :)

I was waiting for the official green light from Logican before taking the plunge to upgrade my vB :)

It's good to hear you are running it without problems tho :)

Ipuck 08-05-2006 03:38 AM

Hello!!

I have tried to run a web query but when I tried to compare two fields it doesn't work.

I create a table with some especial values and I called it "vb_tbulletins" and I want to compare the values to the customer option fields that I have also created.
Fields5,6,7.

If I run the webquery just like the way is shown it works fine.
Quote:

SELECT COMPNAME,BULDTE,MAKETXT,MODELTXT,YEARTXT,SUMMARY
FROM vb_tbulletins
If a tried to get the information from the users extra fields works OK.
Quote:

SELECT COMPNAME,BULDTE,MAKETXT,MODELTXT,YEARTXT,SUMMARY,f ield5,fiel6,field7
FROM vb_tbulletins,vb_userfield
Now if a want to compare the fields, then I get nothing.

Quote:

SELECT COMPNAME,BULDTE,MAKETXT,MODELTXT,YEARTXT,SUMMARY,f ield5,fiel6,field7
FROM vb_tbulletins,vb_userfield
WHERE MAKETXT=field5 AND MODELTXT=field6 AND YEARTXT=field7
Also how can I use the "fields" from the visitor user?

Thank you for help!!

soletrader 08-05-2006 02:09 PM

Will you release a version 3.6.0?

Kihon Kata 08-05-2006 02:39 PM

Why does he need to? It works just fine on 3.6

Logician 08-06-2006 10:28 AM

I've just tested webtemplates with a clean 3.6.x gold and I couldn't find any problems, bugs or glitches. As far as I can see it is working fine. So I can say it is safe to use it with that vb version too.

Yet if anybody catches a problem, please let me know.

rinkrat 08-06-2006 04:19 PM

Awesome hack. Just installed it in 3.6 Gold. Can't wait to start churning out content :)

Ohiosweetheart 08-08-2006 10:00 PM

Someone pointed me to this hack today. I can't wait to work with it this weekend! GOOD to know it's ok for 3.6.0

Razasharp 08-08-2006 10:05 PM

Quote:

Originally Posted by Logician
I've just tested webtemplates with a clean 3.6.x gold and I couldn't find any problems, bugs or glitches. As far as I can see it is working fine. So I can say it is safe to use it with that vb version too.

Yet if anybody catches a problem, please let me know.

Thanks Logician!

Nick0r 08-10-2006 05:04 PM

Logician, I'm struggling with this hack and the THIS_SCRIPT variable. What I'm trying to do is make half my templates be assigned one THIS_SCRIPT and half the other. Now I've used the PHP_INCLUDE and that works fine for contents WITHIN the template, but I have a tab navigation system that's called before the template is called - and PHP_INCLUDE won't influence that.

Is there anyway I can achieve my goal (or, is there a way I can have two logician webtemplates running?)

Logician 08-10-2006 06:14 PM

Quote:

Originally Posted by Nick0r
Logician, I'm struggling with this hack and the THIS_SCRIPT variable. What I'm trying to do is make half my templates be assigned one THIS_SCRIPT and half the other. Now I've used the PHP_INCLUDE and that works fine for contents WITHIN the template, but I have a tab navigation system that's called before the template is called - and PHP_INCLUDE won't influence that.

Is there anyway I can achieve my goal (or, is there a way I can have two logician webtemplates running?)

I havent tested it before but I believe it should work fine if you clone view.php as view2.php and then change the value of THIS_SCRIPT in view2.php

ChrisBaktis 08-11-2006 02:55 AM

Can anyone help me create a webquery to list the top 10 referers?


All times are GMT. The time now is 02:34 PM.

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.02063 seconds
  • Memory Usage 1,868KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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