View Full Version : WebTemplates 3.x: VB Integrated Content Management System
Logician
02-15-2005, 10:00 PM
After a long wait, here is the new 3.x version of Webtemplates for vB 3.x boards. First a short introduction for users who are not familiar with the old version:
This hack is a vBulletin integrated content management system. Term "Webtemplates" stands for dynamic webpages that reside in your MYSQL database and administered inside your vbulletin admin control panel. But they are more than regular site pages because they can automatically inherit visual design of your forum, can apply permissions according to your vb usergroup settings, can keep track of page counts, last visitorname/visit time, display page browsers in the page itself and in your whoisonline page etc. So basically webtemplates are dynamic web pages of your site which are powered by vbulletin. Or more simply putting, with this hack you can create regular HTML pages in your vB admin cp and these pages will be integrated into your vbulletin database about permissions, styles etc.
WEBTEMPLATES 3.x FEATURES:
Easy Installation : Webtemplates can be installed to your board without modifying even a single vbulletin file, nor does it modify any vbulletin database table! It is coded as an add-on, not a hack.
Apply VB Permissions: You can ban any webtemplate to any user or usergroup according to their userids or usergroupids. So for instance you can design a webtemplate which only members can see while guests can not, or only user A can not see etc.
Private Webtemplates : With 1 click you can make a webtemplate "private" and it will be displayed to only certain usergroups.
Draft Webtemplates : You can put webtemplates in "draft" mode which makes them invisible to all but admins.
Page Counter : Each webtemplate has a built-in counter and you can display page count to your visitors and you can edit it or turn it OFF or ON per webtemplate basis.
Visitor Logging&Tracking : You can track certain users' (by usergroup or userid) webtemplates visits to see who visited a webtemplate and when. This is configurable per webtemplate basis. Webtemplates have visits logs which admins can see.
Site Contributers (Editor) Support : You can grant editing permissions for certain users or usergroups for your webtemplates individually and they will be able to update these webtemplates using their own editor interface. vB's WYSIWYG editor is supported in Editor interface!
Page Browsers Display : Webtemplates can display who is browsing that webtemplate while people is reading them (like default forum browse display of vbulletin)
Who is Online Display : Webtemplates can display page visitors in who is online (This is Optional and require a simple hacking in file /functions_online.php). You can create private webtemplates which are hidden in who is online too.
Header/Footer Inclusion : Webtemplates can automatically use headers/footers (your default vb header/footer or custom ones)
Help Documents : The script comes with built-in & detailed help documents (they are webtemplates too).
Admin Panel in Webtemplates : Your webtemplates can include an "admin panel" displayed to only admins and by using them you can access many details and stats of your page while you are browsing them.
Good Performance : Webtemplates 3.x structured so that it performs well even under heavy load conditions and high traffic servers. (See Performance issues below)
Easy Back up: Simply back up your database (inside vbulletin or externally) and all your webtemplate structure is also backed up automatically.
ADVANCED FEATURES FOR ADVANCED USERS:
Webquery Feature : With advanced "webquery" feature you can now add create dynamic webtemplates which include database query results. For instance you can easily add "last 10 threads forum X", "most active users list" etc. to your webtemplates with default webqueries that comes with installation or you can create your custom webqueries with basic SQL knowledge.
Multi Parsing : Webtemplates can parse PHP or HTML or TEXT (=smilie/img tags/bbcode parsing like vb posts). This means you can design a page just like vb posts (TEXT parsing), standart HTML (HTML parsing) or even in PHP (PHP parsing).
PHPINCLUDE per webtemplate : Every webtemplate has its own "phpinclude" field which you can run PHP codes before loading the Webtemplate
Theme Support : Webtemplates support "themes" which are parent webtemplates which include child webtemplates in them. For instance if you have 20 similiar pages which uses the same visual look, you can make a single theme for all of them, then just insert their content into this theme. If you change theme later, all 20 pages' visual will change automatically.
Conditionals : Webtemplates has built-in support for Logician's advanced templates conditionals so you can design webtemplates which change their display under different conditions. (Even if you don't have that hack installed)
Default variables : You can use/display certain variables in your webtemplates like username of the visitor, visitor email address, last visit time, page creation time, page last edit time, Last visitor name, last visit time etc.
Archieve to Text File : Webtemplates/Webqueries can be downloaded to a text file with one click for archiving purposes. You can also easily share these text files with other hack users.
Outside Variables : Advanced users can now use outside variables in webtemplates, then webtemplates will accept/use/process user sent variables via HTTP_GET and HTTP_POST methods (eg. a HTML form can post to a webtemplate with this feature)
For screenshots, FAQ, performance issues, migration from old version to new version, see below.
If you use the hack, clicking here (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=76422) will make sure you'll know about updates&bug fixes. It will also help me understand how many people is using the hack so please click the install button (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=76422) if you use it. Thank you..
Version Updates:
16.Feb.2005 - > Version 3.01
* Hack released.
3.5 Version :
https://vborg.vbsupport.ru/showthread.php?t=103076
Logician
02-16-2005, 07:53 AM
Pre-Installation & Post-Installation FAQs:
Webtemplate Pre-Installation FAQ:
1) I still didn't understand what webtemplate is. Can you clarify more?
Webtemplate is a HTML (or php) page. It is different than your other HTML pages in that you can create them in your vbulletin admin cp and you can integrate them with your vbulletin like applying them vb permissions, styles etc.
2) Uh! this hack looks too complicated! I'm a newbie; can I use it?
This hack has powerful features. But it does not mean you have to learn and use all the features. If you are a newbie, you can be pretty happy with its primary feature: administering your webpages in your vb admin cp and apply vb permissions on them. For this you need no knowledge on anything. Simple copy / paste HTML code of your page, give it a name, enter user/usergroup ID who are banned from this page, click save and you have a webtemplate ready and published automatically.
3) Is installation easy?
Yes, I believe so. Webtemplates is NOT an hack so you don't need to modify any vbulletin files to install webtemplates. So installation is easy.
However there is a long list of SQL queries to run and you will need PHPMYADMIN in your server to run them. Since query list is long, other SQL tools (like vb3 default SQL query tool) might have hard time to run them so PHPMYADMIN is needed. It probably already exists in your server so check your site cpanel (if you have any), check with your hosting company or if server is yours, you can get the script here (http://www.phpmyadmin.net/) for free.
4) I'm afraid to run SQL queries in my database to install this hack. What do you say?
Good call. However please note that Webtemplates installation does NOT modify or touch any vbulletin tables in your database so it is safe. SQL queries needed to create seperate webtemplate database tables and to insert default values in them (like default webtemplates) so that the script can work without bothering your vbulletin tables.
5) Is Webtemplates a portal system?
Umm, no, not exactly! I would define a portal system as a content management system for especially targeting your site home page. I didn't hear a portal which does not replace your site home page. Webtemplates has similiar features like a portal, however it is not designed to replace your site home page. Webtemplates are your "other" site pages but site home.
6) Can I use other portal/vbulletin integrated home page hacks with webtemplates?
Yes you can. Webtemplates neither substite/replace any of them, nor touch them. It is designed as a add-on application and can be installed to your system without your changing even a single vbulletin file so there is no possibility that it will clash with an other hack including a portal/vb home page hack. Besides as webtemplates is not designed to be your site home page, you are welcomed to use any other site home page script while you use webtemplates.
7) Can I use a webtemplate as my site home page?
It is not designed to act as a site home page. I don't use it as my site home page in my site either. However since the prior version, some hack users always insisted to use this hack as their site home page and they managed to do it too. Basically you can do it in 2 ways:
a) you can create a file named index.php and use this line in it:
<?php include ("http://www.yourdomain.com/forum/view.php?pg=your_template"); ?>
When you upload this file in your site home directory, your site home page will be a webtemplate.
b)You can edit your .htaccess file and make a redirection so that whenever your main page (=index.htm or index.html) is called, server opens your webtemplate. A sample redirection line is that:
Redirect /index.html http://www.yoururl.com/forum/view.php?pg=your_template (http://www.yoururl.com/forum/view.php?pg=your_template)
Please search keywords ".htaccess+redirect" in google for more info about .htaccess redirection
Although both methods are safe and effective, I neither encourage, nor support site main page webtemplates as the system is not designed this way in the first place.
8) Does it work in all 3.x.x?
Yes, I would say. It will work any vb version > 3.0.3 and there is a good possibility that it will work in the old 3.x versions as well.
9) How is the hack performance? Does it affect server load? Does it have a lot of queries?
Webtemplates is coded to perform "very well" even under heavy load. A webtemplate has an average of 12-18 queries per page. How many queries you have, depends on which features you enabled for that webtemplate and how many webqueries you use in it.
However always bear in mind that webtemplates, vbulletin itself, or any other dynamic PHP pages which make connection to MYSQL database can never be as "performance friendly" as static HTML pages. Static HTML pages is not dynamic (so does not change according to different conditions etc.) but much less server intensive. So especially in heavy loaded servers and for heavy traffic pages, you may want to use default static .html pages especially if you are not after having a dynamic content in them.
But if you are ready to use a dynamic script/structure/software/solution then webtemplates is NOT a performance killer, you can enjoy this hack. Its performance and affect on the server load is very similiar to a regular vbulletin page, like vb forum home page.
If you use it under heavy traffic conditions, there are many performance tips included in the help document webtemplate, I advice you to check it out.
Webtemplates is also 100% compatible with Teck's Microstats hack so you can monitor webtemplate page creation time, thus performance if you are using Microstats hack in your board. Just add {ms} into your footer webtemplates to display them in your all webtemplates.
10) Do you support this hack?
This hack is 100% free although it can be good match to many commercial CMS. Besides IMO it is one of the best vb integrated CMS you can find in the internet. I share the hack here without any commercial intentions just like many other of my hacks but please understand that I can not commit my entire life to support this free hack. If there is any general bugs, problems or security issues in the hack, I'll do my best to fix them ASAP and release new versions in this thread. You are also very welcomed to ask any hack related questions or future requests here in this thread but please excuse me if I can not find time to answer all. I also don't have plans to enhance the hacks in the near future so new feature requests are welcomed but should not be expected to be coded very soon. I also have many other hacks released here that requires my attention and time so webtemplates is not the only project I devote my time. Thanks for understanding.
11) I have an old version of PHP. Does this hack work in my server?
If your PHP version is older than 4.1.0, you should change and replace all instances of "array_key_exists" to "key_exists" in the view.php file. Other than that, you should be fine.
Webtemplate Post-Installation FAQ:
1) I have installed the webtemplates but I guess it does not work ok?
Double check you've installed each step correctly. For instance make sure you have created the hack templates in ALL templates sets available, the hack files loaded to the correct locations etc.
If you are sure you installed it correctly, then check the thread to see if someone posted a similiar problem and get an answer. If no, post your problem into the thread but please give details! It does not help me to read "the hack does not work!", I need details like what exactly happens when you visit admin cp, default webtemplates etc., what error messages/screens you get etc.
2) Can webtemplates parse PHP code?
Yes, it can. Besides you are given 2 grounds to run PHP:
a) You can make a webtemplate's marking as PHP and it will be treated as a PHP script.
b) Even if your parsing is HTML or TEXT, you can still have php incode in phpinclude section of the webtemplate which will run before webtemplate is displayed
3) Can I put view.php in a different directory?
This requires too many modifications in the hack code so I don't suggest or support it. Do it by your own risk.
4) Can webtemplates include other webtemplates in it?
a) Webtemplates can include header / footer webtemplates in them. So if you need to include webtemplate A, in webtemplate B, you can make A a header or footer.
b) New version supports "themes" which are webtemplates that includes other webtemplates in them. So you can make webtemplate B a theme to include webtemplate A in it.
c) Webtemplates can include regular vb templates in them.
d) Other than that webtemplates can NOT include other webtemplates in them, nor nests loops: (eg A includes B, B includes C etc.)
5) I want display login box if visitor is a guest and log off link if visitor is a member, can I do it?
Yes, use variable $WT_Login in your webtemplate
6) You say Webtemplates inherits visual look (colors/fonts) of our forum. This is good but I want to create a webtemplate with a different design, say red background color. Can I do it?
Yes. Simply create your HTML Code and paste it into webtemplate field and you have your red backgrounded page.
Your Webtemplates inherits your visual design when you use vbulletin HTML tags in your webtemplates. (like default vbulletin templates uses). For instance if you use
<div class=normaltext>Hello</div>
in your webtemplates your text "Hello" will be displayed in the default font (color, size, font name etc.) of your board. But if you use:
<font face="Times New Roman" color="#FF0000" size="4">Hello</font>
your webtemplates will display "Hello" in Times New Roman, RED color and size 4.
7) I want to post smilies/bbcode/IMG tags to my webtemplate, can I?
Yes. Simply change your webtemplate parse method as TEXT. In TEXT parsing, webtemplates will display your bbcodes/smilies etc.
After that, if you want to have a page creation enviroment like thread posting (bbcode/smilie boxes are displayed in formation page), design your webtebtemplate in editor interface instead of admin interface.
8) How do I backup my webtemplates?
1- While backing up your database in your admin cp, vbulletin will back up your webtemplate tables too.
2- You can download your webtemplates/webqueries in text files and save it for further use. You are welcomed to share them here with other hack users.
9) I have more than 1 database. Can webqueries query my other databases?
No. They only query the database your vbulletin resides.
10) Can webtemplates be searched in Vbulletin search?
No.
11) Do Webtemplates have search engine friendly URLs?
No. However see here for a tip:
https://vborg.vbsupport.ru/showthread.php?postid=386256#post386256 (https://vborg.vbsupport.ru/showthread.php?postid=386256#post386256)
12) How can I create a webquery that does X?
You are welcomed to ask these questions and I'm hoping that someone will help you with creating custom webtemplates/webqueries but please understand that I can not take time to answer all "how can I create such webquery" questions as there are infinite SQL queries that can be requested. Thanks for understanding.
13) Can I add a vb poll into a webtemplate?
Manually yes.. Simply copy paste its HTML code. Automatically no.
14) Can I use this as a news page by retriving last X posts from forum Y?
This was impossible in the old version of the hack but with the 3.x version it is now possible. As a matter of fact I've included a sample webquery to do that into the installation and you can check it in the test2 webtemplate. So the answer is yes.
15) How can I enable Microstats hack stats in webtemplates?
If you already have the hack installed, add its tag {ms} to your webtemplates (preferrably your footer templates).
16) Do Webtemplates support vb Phrases?
Mostly. Webtemplate recognizes and parses the vb phrases that are in GLOBAL group and in some other groups which are specified in the begining of "view.php" starting with this line: $phrasegroups = array('
You can edit this line to add more phrase groups to webtemplates pages. Though only basic phrases in these groups are supported, not the advanced ones that includes {1} {2} in it.
17) How can I use "Editors" feature effectively?
You can assign Editors to your webtemplates who can edit them by using their own editor interface.
If your editors know HTML, that is ok, then you can assign them to any webtemplate you like even the ones with HTML parsing.
However in most cases your site helpers will not know HTML to customize your HTML templates. If this is the case, you can follow this strategy:
1- Create a theme (with HTML parsing) and design it yourself with HTML.
2- Create child webtemplates that uses this theme. Make sure child webtemplates has TEXT parsing (not HTML).
3- Assign your editors to these child webtemplates. Since they are in TEXT parsing, your editors interface will now include smilie box, BBCode box and will look like exactly thread posting interface. They can then design the webtemplate with BBCode, smilies, IMG tags just like they are posting a new thread and without any need to use HTML commands.
18) Can link a certain section (paragraph, line etc.) in a webtemplate?
Yes you can:
a) Insert an HTML anchor to the location you want to link (eg. to the very begining of the paragraph) like this : <a name="anchor1"></a>
b) Then you can link this section like this:
http://www.yoururl.com/forum/view.php?pg=your_template#anchor1 (http://www.yoururl.com/forum/view.php?pg=your_template#anchor1)
18) Can I use vb's WYSIWYG Editor to design Webtemplates?
Yes. However not in your admin interface, but in the editor interface. So create a webtemplate page, then visit it and click "Edit This Page" link you see in stats line which will take you to the editor interface. You'll have WYSIWYG editor in that interface provided that:
a) That is your set bbcode interface in your usercp
b) The webtemplate is a "TEXT" parsed webtemplate.
19) Can Webtemplates run FLASH code in it?
Webtemplates can do anything regular HTML pages can do, so yes, they allow flash too. Just create your flash snippet and add it to your webtemplate just like you are adding in a regular .html page. Make sure your webtemplate's parsing is set as "HTML".
Logician
02-16-2005, 07:54 AM
MIGRATION FROM OLD vB2.x VERSIONS AND vb2.x/vb3.x ISSUES:
If you were a webtemplate ver 2.x user in vb.2.x times and you still keep your webtemplates in your database, these instructions will help you to upgrade your webtemplates into version 3.x
Logician
02-16-2005, 07:54 AM
[reserved for future use] .......
I understand this isn't supposed to be a portal but just to clarify, is this sort of like the "Make your own vB powered page?" I have pages like:
http://www.golfrewind.com/teamgr.php?
http://www.golfrewind.com/fantasygolf.php?
Is this an easier way to create those pages?
Logician
02-16-2005, 08:45 AM
I understand this isn't supposed to be a portal but just to clarify, is this sort of like the "Make your own vB powered page?" I have pages like:
http://www.golfrewind.com/teamgr.php?
http://www.golfrewind.com/fantasygolf.php?
Is this an easier way to create those pages?
Yes.. Exactly.
Blam Forumz
02-16-2005, 08:56 AM
This looks very promising :), I get an error when I run this query:
DROP TABLE IF EXISTS `wt2_queries`;
CREATE TABLE `wt2_queries` (
`qid` int(10) unsigned NOT NULL auto_increment,
`qname` varchar(200) NOT NULL default '',
`qdescription` varchar(250) NOT NULL default '',
`query` mediumtext NOT NULL,
`affixcode` mediumtext NOT NULL,
`prefixcode` mediumtext NOT NULL,
`resultrow` mediumtext NOT NULL,
`noresultrow` mediumtext NOT NULL,
`qbbcodeparse` varchar(250) NOT NULL default '',
`qdateparse` varchar(250) NOT NULL default '',
`qtype` tinyint(2) unsigned NOT NULL default '1',
`qnumberparse` varchar(250) NOT NULL default '',
`qphpinclude` mediumtext NOT NULL,
PRIMARY KEY (`qid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;
i get this error :
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1 AUTO_INCREMENT=10' at line 16
Guy G
02-16-2005, 09:03 AM
Cool addon you made there.. sounds usefull.
great job
Logician
02-16-2005, 09:05 AM
i get this error :
I've updated the installation file above. Please redownload and run the new SQL query file you'll find attached. (Only that file changed).
The problem was because your MYSQL server version was older than my servers' and the new SQL queries should be compatible with older versions as well.
Warning: main(../wt_options.php): failed to open stream: No such file or directory in /admincp/webtemplate.php on line 30
Fatal error: main(): Failed opening required '../wt_options.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home3/nzboards/public_html/forums/admincp/webtemplate.php on line 30
Changing the path on line 30 to './wt_options.php' a couple of times fixed it.
This hack is incredible. :)
Blam Forumz
02-16-2005, 09:34 AM
edit : thanks
Logician
02-16-2005, 09:36 AM
Warning: main(../wt_options.php): failed to open stream: No such file or directory in /admincp/webtemplate.php on line 30
Fatal error: main(): Failed opening required '../wt_options.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home3/nzboards/public_html/forums/admincp/webtemplate.php on line 30
Changing the path on line 30 to './wt_options.php' a couple of times fixed it.
This hack is incredible. :)
Right.. I've updated the hack file, thanks for pointing out.
Deaths
02-16-2005, 10:41 AM
Very nice!
/me clicks install
yoyoyoyo
02-16-2005, 11:26 AM
very nice!
The Realist
02-16-2005, 11:56 AM
Installed and as usual working 100% :)
Nice... :) thanks logician
squawell
02-16-2005, 03:30 PM
nice hack and thankz logician:D
* squawell clicks install...
T3MEDIA
02-16-2005, 03:45 PM
Sold to the user in the corner!
Breaker
02-16-2005, 09:25 PM
nice hack.... just one thing i would really like
i want to have a page that has php code in the middle of the template, but i also want to be able to use the core vBulletin things like phrases and templates.... is there anyway this can be done using this hack?
T3MEDIA
02-16-2005, 11:30 PM
nice hack.... just one thing i would really like
i want to have a page that has php code in the middle of the template, but i also want to be able to use the core vBulletin things like phrases and templates.... is there anyway this can be done using this hack?Agreed. Hey is it cool to have a mini hack page that would have templates for this hack?
Logician
02-17-2005, 05:28 AM
i want to have a page that has php code in the middle of the template, but i also want to be able to use the core vBulletin things like phrases and templates.... is there anyway this can be done using this hack?
every webtemplate has a "phpinclude" section. So you can run your phpcode in this section and assign its HTML code into a variable, then use this variable to paste content in the middle of your HTML or TEXT parsed webtemplate.
Logician
02-17-2005, 05:52 AM
Agreed. Hey is it cool to have a mini hack page that would have templates for this hack?
We used to have such a thread for the old version of the hack here:
https://vborg.vbsupport.ru/showthread.php?t=36578
I had created it witht he hope of people's sharing their custom webtemplate and webqueries with other users, however in time the thread turned into a "how can I create this webtemplate/webquery" support thread.
So I encourage all to use the hack thread itself for sharing their samples for now and if we have enough sharing users, we can create a dedicated thread later. Or if you are determined, feel free to start your own thread. ;)
Breaker
02-17-2005, 06:27 AM
every webtemplate has a "phpinclude" section. So you can run your phpcode in this section and assign its HTML code into a variable, then use this variable to paste content in the middle of your HTML or TEXT parsed webtemplate.
my problem is a want to include a file that spits out a bit of HTML into the middle of my template and you cant really set variables to include("file.php"); and have them work within this sort of thing. (if there is a method let me know though)
neocorteqz
02-17-2005, 07:30 AM
Been looking for something Big from you Logician.
Very nice hack, will Download and Click install As soon as I win this Hold'em Tournament. :D
Blam Forumz
02-17-2005, 09:01 AM
One problem is the admin pages, things are too lightly coloured to read ><
yahoooh
02-17-2005, 10:42 AM
i have this error now:
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ';
CREATE TABLE `wt2_queries` (
`qid` int(10) unsigned NOT N
Logician
02-17-2005, 11:20 AM
i have this error now:
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ';
CREATE TABLE `wt2_queries` (
`qid` int(10) unsigned NOT N
Make sure you downloaded the latest installation file (I updated them a few times yesterday) and make sure you run the queries in phpmyadmin, not in a different tool.
yahoooh
02-17-2005, 11:43 PM
ok it is work with phpmyadmin
thanks
SVTBlackLight01
02-18-2005, 01:09 AM
One problem is the admin pages, things are too lightly coloured to read ><
Actually, the cause of this is that the style for the admin pages are hardcoded and don't use the admincp stylesheets. It's only cosmetic though. Any chance this will be updated, Logician?
This hack is awesome Logician! :up:
Logician
02-18-2005, 05:04 AM
Actually, the cause of this is that the style for the admin pages are hardcoded and don't use the admincp stylesheets. It's only cosmetic though. Any chance this will be updated, Logician?
This hack is awesome Logician! :up:
ok I've made some changes to the admincp colors. Please redownload the hack and only replace files webtemplate.php webquery.php and wt_functions.php with the new files and let me know how this improved your visual.
Blam Forumz
02-18-2005, 05:47 AM
Brillian, thanks :) Everythings crystal clear now :)
neocorteqz
02-18-2005, 07:41 AM
ohh man, a kick ass hack. :)
One little problem. When clicking preview to preview what the template looks like. The windows doesn't pop up for the preview.
I'm trying to preview the footer template so i may add {ms} to it for Teck's hack. And I need to look for the best spot. :) Other than that. Very nice Job logician. :)
Logician
02-18-2005, 08:14 AM
ohh man, a kick ass hack. :)
One little problem. When clicking preview to preview what the template looks like. The windows doesn't pop up for the preview.
I'm trying to preview the footer template so i may add {ms} to it for Teck's hack. And I need to look for the best spot. :) Other than that. Very nice Job logician. :)
good catch, fixed and updated.. upload new webtemplate.php to your admincp folder.
winky6
02-18-2005, 05:59 PM
I love you................. I love you ...........I love you
SVTBlackLight01
02-18-2005, 06:12 PM
Is it possible to include existing custom templates in the themes?
Intex
02-19-2005, 05:52 AM
Nice work Logician. I thought v2 was great. I'll add this to my install list :cool:.
jluerken
02-19-2005, 08:44 AM
Installed and its working fine.
One more question, how can I make the webtamples use always the normal forum header and footer?
At the moment is using its own header and templates files but I want it to use the forum header and footer template instead.
Logician
02-19-2005, 08:50 AM
Installed and its working fine.
One more question, how can I make the webtamples use always the normal forum header and footer?
At the moment is using its own header and templates files but I want it to use the forum header and footer template instead.
Edit the webtemplate and set the header/footer as default vb header/footer.
jluerken
02-19-2005, 09:15 AM
Edit the webtemplate and set the header/footer as default vb header/footer.
Did not know that its so easy. :D
Thanks
neocorteqz
02-19-2005, 10:03 AM
quick question on conditionals.
I want to set up some Admin and Mod only stuff, and want to use the following.
<if condition="is_member_of($bbuserinfo,5,6,7,32)">
But it's still showing for all usergroups.
I even tried
<if condition="$bbuserinfo[usergroupid] == 6">
and that didn't work.
so what conditionals work?
and I have 'Have conditionals?' set to yes
Logician
02-19-2005, 10:10 AM
quick question on conditionals.
Please check help webtemplate, details are there.
neocorteqz
02-19-2005, 10:35 AM
Please check help webtemplate, details are there.
thanks.
Agester
02-19-2005, 11:30 PM
woot!!! going to install very soon, thanks logician :D
T3MEDIA
02-23-2005, 08:02 PM
why did you use your own conditionals? I am just curious.
Do you have a complete list? (Just in case you get busy or not arround) EVERYONE knows only a few people on vb actually help so I would like to do work even if your not arround.
a full list with quick simple examples would be awsome.
Like your dynamic pop up. There were some hidden gems you gave users. I wouldnt have know them if you didnt show them in the thread.
Thanks.
Logician
02-24-2005, 10:38 AM
why did you use your own conditionals? I am just curious.
Because although most of you met with this hack recently due to this new 3.x version, webtemplates hack is pretty old whose roots (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36419) go back to March 2002.
My conditional syntax is first introduced in this first version of webtemplates and then I used the same context in many of my other hacks. At this time, there was no VB3 and vbulletin had no conditional concept. In other words my conditional syntax and concept is older than that of vb3.
To maintain backward compatibility, I keep supporting my syntax in my own hacks, besides I find it easier to use.
a full list with quick simple examples would be awsome.
Like your dynamic pop up. There were some hidden gems you gave users. I wouldnt have know them if you didnt show them in the thread.
My conditional syntax is same in all my hacks so Dynamic Forum Home Announcement conditionals are fully compatible with webtemplates or vice versa. Hence you can use these samples in webtemplates.
T3MEDIA
02-25-2005, 03:09 AM
Because although most of you met with this hack recently due to this new 3.x version, webtemplates hack is pretty old whose roots (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36419) go back to March 2002.
My conditional syntax is first introduced in this first version of webtemplates and then I used the same context in many of my other hacks. At this time, there was no VB3 and vbulletin had no conditional concept. In other words my conditional syntax and concept is older than that of vb3.
To maintain backward compatibility, I keep supporting my syntax in my own hacks, besides I find it easier to use.
My conditional syntax is same in all my hacks so Dynamic Forum Home Announcement conditionals are fully compatible with webtemplates or vice versa. Hence you can use these samples in webtemplates.yes but they dont have a full list.
Is there a list to go by?
jluerken
02-25-2005, 05:05 AM
yes but they dont have a full list.
Is there a list to go by?
I would also like to see a list of condition examples.
I don't think that Jelsoft has one so maybe we can collect some here?
Logician
02-25-2005, 07:52 AM
yes but they dont have a full list.
Is there a list to go by?
Full list of what exactly? The conditionals that you can build up is endless, they can not be restricted to a list. If you are looking for samples of this endless list (generally most used), you can find them in the hack threads of my relevant hacks (Webtemplates 2.x for vb2.x, Advanced Templates w/Conditionals hack for vb2.x, Dynamic Forum Home Announcement hack for vb2.x, Dynamic Forum Home Announcement hack for vb3.x)
Besides the conditionals you can use with this hack is not much different than the default conditionals of vb3. It is just the syntax that matters. So Vb 3 syntax is:
<if condition="$bbuserinfo[userid]==1">
if userid is 1, show this
</if>
my syntax is:
[[($bbuserinfo[userid]==1)]]
if userid is 1, show this
[[/($bbuserinfo[userid]==1)]]
as you can see the conditional here is same ($bbuserinfo[userid]==1), it is just the syntax that differs.
Agester
02-27-2005, 01:29 AM
Worked great first time around on install! Great work man! Just a few modifications on colors for text and background to match my site, but it works awesome! Thanks!
lucabosurgi
03-01-2005, 02:18 PM
I just installed the February version of the hack on 3.0.7,
but I can find the sentences indicated in the optional php modifications.
Any one can help?
Logician
03-01-2005, 04:08 PM
I just installed the February version of the hack on 3.0.7,
but I can find the sentences indicated in the optional php modifications.
Any one can help?
There are 3 optional steps. In which of them you have the problem?
lucabosurgi
03-01-2005, 04:22 PM
There are 3 optional steps. In which of them you have the problem?
In the first 2, the following codes are not in this files:
Thank you
1- admin/index.php
find
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
makenavselect("Options");
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
For this edit online.php
1- find
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
require('./global.php');
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
2- find:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
global $thread, $post, $forum, $event, $gotforum, $hideprivateforums, $bbuserinfo, $timeformat, $displayemails, $enablepms, $bbtitle, $usergroupdef, $numberguests;
2- find
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
default:
// Let's show the admin the location but put something false up for everyone else..
if ($bbuserinfo[usergroupid] == 6) {
$userinfo[location] = htmlspecialchars(stripslashes(replacesession($user info[location])));
$userinfo[where] = "<b>Unknown Location:</b> <a href=\"$userinfo[location]\">$userinfo[location]</a>";
} else {
// We were unable to parse the location
$userinfo[where] = "$bbtitle <a href='index.php?s=$session[sessionhash]'>Main Index</a>";
}
}
$userinfo[time] = vbdate($timeformat,$userinfo[lastactivity]);
Logician
03-01-2005, 04:31 PM
In the first 2, the following codes are not in this files:
Thank you
I think you have a big confusion somewhere. The code you quoted is not from this version of the hack but it is from Webtemplates v2.x hack. If you are installing the 3.x version, please redownload the instructions from this thread and apply only this instructions to your board. Do not download or apply ver2.x instructions, it is for vbulletin 2.x boards!
lucabosurgi
03-01-2005, 05:06 PM
This make more sense, thank you.
I already ran the SQL query with the old file, I will redo it with the new sql file and I shall be done :)
BigIke
03-02-2005, 01:40 AM
let me just say, awesome hack dude... i cant tell you enough how much this helps me
lucabosurgi
03-02-2005, 09:48 AM
This is superb, thank you!!! Work beautifully!!!!
It is the hack I desperately needed to finish my integration.
I will be up next week at www.fmag.net.
lucabosurgi
03-02-2005, 02:34 PM
I have an annoying problem, when I reload the page created with webpage I loose the username and password in the log-in window...
http://www.fmagazine.com/fmusic_test.htm
Welcome page and chat are created with this great hack
Please help...
lucabosurgi
03-02-2005, 04:11 PM
I found the problem, it is NOT the hack.
Maybe some one can help me, I'm calling a page created with webpage from an external flash button in a different div/iframe with:
getURL("http://fmagazine.com/forum/view.php?pg=chat_template$session[sessionurl]", "forum");
This don't find the url
If instead I use:
getURL("http://fmagazine.com/forum/view.php?pg=chat_template", "forum");
I get the page but I loose the user name.
Please help
JAYEMULE
03-03-2005, 01:03 PM
This sounds very interesting though I am wondering. Since I am still new at this would it be easy for me to use ? User friendly level would ? I will put on my test board and prctice first ;) Looks very useful.
Logician
03-03-2005, 01:51 PM
This sounds very interesting though I am wondering. Since I am still new at this would it be easy for me to use ? User friendly level would ? I will put on my test board and prctice first ;) Looks very useful.
I guess FAQ item 2 answers your question.
BTW no, this hack is not even half interesting in comparison to your site's subject. :)
T3MEDIA
03-04-2005, 05:47 PM
Full list of what exactly? The conditionals that you can build up is endless, they can not be restricted to a list. If you are looking for samples of this endless list (generally most used), you can find them in the hack threads of my relevant hacks (Webtemplates 2.x for vb2.x, Advanced Templates w/Conditionals hack for vb2.x, Dynamic Forum Home Announcement hack for vb2.x, Dynamic Forum Home Announcement hack for vb3.x)
Besides the conditionals you can use with this hack is not much different than the default conditionals of vb3. It is just the syntax that matters. So Vb 3 syntax is:
<if condition="$bbuserinfo[userid]==1">
if userid is 1, show this
</if>
my syntax is:
[[($bbuserinfo[userid]==1)]]
if userid is 1, show this
[[/($bbuserinfo[userid]==1)]]
as you can see the conditional here is same ($bbuserinfo[userid]==1), it is just the syntax that differs.
Well I guess your pop up hack was nice becuase it had so many conditional examples. I thought you would make a full text list so users could move forward.
T3MEDIA
03-04-2005, 05:50 PM
you think you can show me log... how to make a random 5 users picture page with this? I wouldnt know how to begin.
I was looking for something like this. http://myspace.com/
hit refresh the cool new people change.
Paolino_Preach
03-06-2005, 12:37 PM
I'm getting this when I run the query. I tried both options of copy/paste, and browsing for the file.
Error
SQL-query :
* -
MySQL said:
You have an error in your SQL syntax near '--' at line 1
Back
neocorteqz
03-14-2005, 07:35 AM
I added a custom template conditional per this Thread (https://vborg.vbsupport.ru/showthread.php?p=625281#post625281).
and when trying to use it with webtemplates, it's showing the actual code in the page instead of parsing the code.
I have enabled conditionals in the template.
[[is_os('windows')]]
[[//is_os('windows')]].
That is the conditional I'm trying to use.
I've tried is_browser and I know that works correctly, is there any reason the custom template conditional I made will not work with this mod?
I've even tried adding it to /adminCP/webtemplate.php;
require_once('./os.php');
But of course it cannot redeclare is_os(), because it's already in functions.php
Thanks.
Logician
03-14-2005, 11:18 AM
I added a custom template conditional per this Thread (https://vborg.vbsupport.ru/showthread.php?p=625281#post625281).
and when trying to use it with webtemplates, it's showing the actual code in
[[is_os('windows')]]
[[//is_os('windows')]].
That is the conditional I'm trying to use.
Your conditional syntax is wrong. It should be
[[(is_os('windows'))]]
[[/(is_os('windows'))]]
T3MEDIA
03-14-2005, 01:44 PM
you think you can show me log... how to make a random 5 users picture page with this? I wouldnt know how to begin.
I was looking for something like this. http://myspace.com/
hit refresh the cool new people change.
anyone?
EH-Jay
03-14-2005, 03:28 PM
You should add this onto it Logician :)
Open
admincp/index.php
Find
if (can_administer('canadminstyles'))
Above this add
construct_nav_option("Content Webpage", 'webtemplate.php', '<br />');
construct_nav_option("Content Web Query", 'webquery.php', '<br />');
construct_nav_group("Content Management", '<hr />');
Just makes it easier to get too ;)
EH-Jay
03-14-2005, 03:29 PM
btw installed the hack, 100% perfect. awesome work :)
Logician
03-14-2005, 03:46 PM
You should add this onto it Logician :)
Open
admincp/index.php
Find
if (can_administer('canadminstyles'))
Above this add
construct_nav_option("Content Webpage", 'webtemplate.php', '<br />');
construct_nav_option("Content Web Query", 'webquery.php', '<br />');
construct_nav_group("Content Management", '<hr />');
Just makes it easier to get too ;)
Already there, isn't it? Optional step 1 ^^
neocorteqz
03-14-2005, 05:13 PM
Your conditional syntax is wrong. It should be
[[(is_os('windows'))]]
[[/(is_os('windows'))]]
Thanks. :o
EH-Jay
03-14-2005, 07:07 PM
If it is, I didn't see it! lol mb.
EH-Jay
03-18-2005, 11:53 PM
Ok I actually toyed around with it a little and got this when putting in my header and footer into the header/footer templates that were already there:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/deathleg/public_html/forums/view.php(617) : eval()'d code on line 20
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/deathleg/public_html/forums/view.php(623) : eval()'d code on line 23
whats up with that? Any help?
Thanks
Hi Logican and others,
I happen to come across this hack only sometime back. I installed it and from the looks of it the mod is simply superb. I am yet to exploit it fully but am wondering if you have used this mod on your forums then please post the URL here for others to see what can be done to make a good use of such a mod.
:squareeyed:
I am thinking of making a section for Vendors on my board and maybe I can use it for that.
thanks
neocorteqz
03-19-2005, 01:29 AM
Ok I actually toyed around with it a little and got this when putting in my header and footer into the header/footer templates that were already there:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/deathleg/public_html/forums/view.php(617) : eval()'d code on line 20
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/deathleg/public_html/forums/view.php(623) : eval()'d code on line 23
whats up with that? Any help?
Thanks
Did you add a conditional? or some code?
Logician
03-19-2005, 07:02 AM
Ok I actually toyed around with it a little and got this when putting in my header and footer into the header/footer templates that were already there:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/deathleg/public_html/forums/view.php(617) : eval()'d code on line 20
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/deathleg/public_html/forums/view.php(623) : eval()'d code on line 23
whats up with that? Any help?
Thanks
Make sure you don't use headers/footers with PHP parsed webtemplates.
EH-Jay
03-20-2005, 12:40 AM
So do I have to create my own header/footer pages? I used the coding that is in my header and footer for my forum. I don't get the error =/
Logician
03-20-2005, 09:21 AM
So do I have to create my own header/footer pages? I used the coding that is in my header and footer for my forum. I don't get the error =/
I don't get your problem exactly. All I'm saying is that IF your webtemplate is "PHP parsed" you can NOT include any header and footer in it, otherwise you'd get PARSE error. (This is also stated in help document). Headers and footers are for "TEXT" or "HTML" parsed webtemplates.
If your webtemplate is already TEXT or HTML parsed but you still get an parse error, then paste the content of your header and webtemplate that gives the error and I'll check.
Logician
03-20-2005, 09:23 AM
I happen to come across this hack only sometime back. I installed it and from the looks of it the mod is simply superb. I am yet to exploit it fully but am wondering if you have used this mod on your forums then please post the URL here for others to see what can be done to make a good use of such a mod.
Tip : Type "Logician webtemplates 3.01" in google. ;)
m0nde
03-20-2005, 07:14 PM
Will this hack conflict with my vBadvanced installation? Or will it simply offer more features alongside that hack?
I'm using that at the moment and it is sufficient as a CMS addon to vBulletin, but I'm looking for more features.
I have another site where I use XOOPS, a freeware CMS system, but the forum options in that package are nowhere as bug-free, or feature-rich as vBulletin.
I'm looking for something that's a happy medium between XOOPS and vBulletin.
My sites are ScALR Network Solutions (http://www.scalr.com) and BostonLove (http://www.bostonlove.org)
- Sid
DanCan
03-20-2005, 07:23 PM
I got this error after running the MySQL queries:
Invalid SQL: SELECT wtid,title,pagecount,category,doaction,draft,forpa id,template FROM wt2_templates WHERE headerfooter=0 ORDER BY category DESC, title ASC
mysql error: Table 'database.wt2_templates' doesn't exist
mysql error number: 1146
Since MySQL is integrated in my cpanel, I had to cut and paste the query. I pasted everything, including the beginning of the query:
-- phpMyAdmin SQL Dump
-- version 2.6.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 14, 2005 at 10:46 PM
-- Server version: 4.1.8
-- PHP Version: 4.3.1
--
-- Database: `306`
--
-- --------------------------------------------------------
--
-- Table structure for table `wt2_queries`
-- etc. etc.
I am not familar with mysql queries. Do I have to select any fieldnames, or do I simply paste them in the database box (this is what I did)?
Logician
03-20-2005, 07:46 PM
Will this hack conflict with my vBadvanced installation?
As stated in FAQ, the answer is no.
I got this error after running the MySQL queries:
Please run the query in phpmyadmin. More info in FAQ and installation document.
DanCan
03-20-2005, 07:56 PM
I did, but now I learned how to do it in the way you preferred, and now it works. - and I actually learned how to run a SQL query.
Thanks.
DanCan
03-20-2005, 07:58 PM
And wow! Just checked the test page. This looks great! Can't wait to use it.
Thanks
m0nde
03-20-2005, 09:11 PM
I hadn't read the FAQ properly. Thanks for the quick reply.
I don't have phpmyadmin installed to run the sql query.
So I added my account into the appropriate line in config.php and ran the query from Admin CP | Import & Maintenance | Execute SQL Query
After doing this, I received the errors below:
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax near ';
CREATE TABLE `wt2_queries` (
`qid` int(10) unsigned NOT NULL auto_incremen' at line 19
I really want to try out WebTemplates.
EH-Jay
03-20-2005, 11:56 PM
I don't get your problem exactly. All I'm saying is that IF your webtemplate is "PHP parsed" you can NOT include any header and footer in it, otherwise you'd get PARSE error. (This is also stated in help document). Headers and footers are for "TEXT" or "HTML" parsed webtemplates.
If your webtemplate is already TEXT or HTML parsed but you still get an parse error, then paste the content of your header and webtemplate that gives the error and I'll check.
"Header/Footer Templates:" was what I was talking about. It says in the 2 files "Header/Footer Templates are always HTML parsed."
So? I'm lost :(
Logician
03-21-2005, 05:15 AM
I hadn't read the FAQ properly. Thanks for the quick reply.
I don't have phpmyadmin installed to run the sql query.
So I added my account into the appropriate line in config.php and ran the query from Admin CP | Import & Maintenance | Execute SQL Query
After doing this, I received the errors below:
You gotto install phpmyadmin. It is a free script anyway. Please read the FAQ.
neocorteqz
03-21-2005, 06:48 AM
You can also run Queries from the vBull admin CP
Logician
03-21-2005, 08:42 AM
You can also run Queries from the vBull admin CP
No, not for this hack's installation. It involves a long query list which vb admin cp run query tool can not handle, so phpmyadmin is strongly recommended.
m0nde
03-21-2005, 06:25 PM
You gotto install phpmyadmin. It is a free script anyway. Please read the FAQ.
I managed to work through this myself, but you're right, PHPMyAdmin was easy and straight forward to install and made it work.
I did have some problems with pathing because I'm running all this on Windows 2003 SBS. But i changed the Windows pathing scheme on line 29 of webtemplate.php from ..\ to .\ and it worked fine.
All said and done, WebTemplates is a very good add-on and I can see myself using it for various custom pages.
I would like to see you create an auto-install script, Logician, which will place all the files automatically and even execute the query automatically. This would make things simpler, even though the install is fairly straight forward.
Again, thank you very much for your help and for an exellent piece of work. :up:
Izze_de
03-22-2005, 12:15 PM
hi,
i am trying to create a new theme based on the "Two Column Theme".
i want to insert the vbadvanced portal left column instead of the stats.
code is following:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle] $WT_PageName</title>
$headinclude
</head>
<body>
$header
$navbar
$nowbrowsing
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="$vba_options[portal_leftcolwidth]" valign="top">
<if condition="$show['left_column']">
$home[leftblocks]
</if>
<br>
</td>
<td width="20"><input type="image" src="$vboptions[cleargifurl]" width="20" height="1"></td>
<td valign="top"> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<thead>
<tr>
<td class="tcat" align="left">» $WT_PageName</td>
</tr>
<tr>
<td class="alt2" align="left">
<div class="normalfont">
$includedtemplate
</div>
</td>
</tr>
<tr>
<td class="thead" align="left"> Page
Visitors: <b>$count</b>, Last Visitor was $WT[lastvisitorname]
at $WT[lastvisitdate]. $WT_Editor_link<br>
Page Created at <b>$creationdate</b>, Last Modified
: <b>$lasteditdate</b>.</td>
</tr>
</thead>
</table>
</td>
</tr>
</table>
$footer
</body>
</html>
but when i try to view the testpage it says:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /path/to/forum/view.php(657) : eval()'d code on line 14
is it possible to include the portal boxes and when, how ?
Thank you.
vulture
03-22-2005, 11:45 PM
Could I use webtemplates to integrate an rss news feed?
So when a user click on a rss news feed, it pulls the content from the news site and displays it in a page generated by webtemplates?
Buddha
03-24-2005, 01:50 PM
installed.
exactly what i needed... very very nice work done. thank you very much for this addon.
i've got it setup to show X posts from XX forum right now, which was simple to setup. i'm wondering if anyone could tell me how to set it up that the poster's avatar appears too.
thanks.
edit
also, when someone is viewing the page, it shows in Who's Online as an unknown location. is there a way to change that?
thank you.
Logician
03-24-2005, 02:45 PM
also, when someone is viewing the page, it shows in Who's Online as an unknown location. is there a way to change that?
You need to install "OPTIONAL STEP 2" for this request.
Buddha
03-24-2005, 03:25 PM
my apologies... i misread that to mean something else. completely my fault though.
again, thanks for the great add-on.
bamaster
03-25-2005, 01:28 AM
Can someone tell me if WebTemplates can do this?
I have a script, similar to a user log/diary, which I'd like to give each of my users... essentially link to the user table. I need a way to run this script, query a database with stats/text, and display results. The script will need to be as secure as the user session, meaning they have to be logged in to use it and cannot view other people's log/diary.
Can WebTemplates allow me to run a php/mysql script inside the vB skin and tap into the vB user/security?
Many thanks in advance!
EH-Jay
03-29-2005, 11:37 PM
Logican can you help me? All I did was I copied the coding from my forums' header template and pasted it into the header that came with the installation of this hack.
On the top of the basic page, I'm getting this error:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/deathleg/public_html/forums/view.php(617) : eval()'d code on line 20
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/deathleg/public_html/forums/view.php(623) : eval()'d code on line 23
What can I do to fix this? What do I do?
Thanks
Logician
03-30-2005, 06:43 AM
Logican can you help me? All I did was I copied the coding from my forums' header template and pasted it into the header that came with the installation of this hack.
On the top of the basic page, I'm getting this error:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/deathleg/public_html/forums/view.php(617) : eval()'d code on line 20
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/deathleg/public_html/forums/view.php(623) : eval()'d code on line 23
What can I do to fix this? What do I do?
Thanks
Do NOT use VB3 conditionals in webtemplates. If you need to use conditionals you have to use my conditional syntax.
For instance your source code has:
<if condition="$show['left_column']">
$home[leftblocks]
</if>
which is in VB3 conditional format.
actolearn
03-30-2005, 04:38 PM
i'm still trying to grasp the full potential of this hack....seems wonderful....any screenshots of the admincp? seeing that could help.
Logician
03-30-2005, 04:54 PM
any screenshots of the admincp? seeing that could help.
here you go.
BigIke
03-31-2005, 01:37 AM
If I have an URL whose target I would like to ="blank", how would I do that if my page is parsed in text mode? Thanks
BigIke
03-31-2005, 03:47 PM
hmm.. nevermind. The link pops up in a different window somehow..
ricoche
04-07-2005, 04:04 AM
How search engine friendly is this? Let's say you write articles or tutorials using this template system. Would this get spidered? I know lots of text the regular threads in vb will get picked up, but I am not sure if a full blown article in webtemplates will get spidered. Just wondering how SEO friendly this is.
Thanks very much.
Logician
04-07-2005, 06:02 AM
How search engine friendly is this? Let's say you write articles or tutorials using this template system. Would this get spidered? I know lots of text the regular threads in vb will get picked up, but I am not sure if a full blown article in webtemplates will get spidered. Just wondering how SEO friendly this is.
Thanks very much.
Have you checked FAQ?
BigIke
04-08-2005, 10:16 PM
Logician are you considering improving this hack? It is definetely my favorite out of all hacks released here. If you were, I have some ideas maybe to help you (just suggestions)..
a.) If there is a way, to parse pages as text and html? For example, on one of my pages I wanted to create a table, but also use the WYSIWYG editor below the table. This would be cool if possible.
b.) Polls in pages would also be sick
c.) Pages able to be searched from forum search
I know that coding is a hard job, because I am trying to learn PHP right now, and I'm stuck on like page 4 lol, so if you've got other priorities, I know the community and I would understand. Thanks for an awesome hack
Logician
04-09-2005, 06:41 AM
Logician are you considering improving this hack? It is definetely my favorite out of all hacks released here. If you were, I have some ideas maybe to help you (just suggestions)..
I appreciate your suggestions.
I agree that this hack has a lot of potential to be improved and I'd like to improve it. However my time that I can spend for my vb.org hacks are very limited and unfortunately I don't see a chance to improve this hack in the near future. As a matter of fact it even took me a year to port it to VB3 and I have other pending hacks to port before concentrating into webtemplates. Sorry about it.
a.) If there is a way, to parse pages as text and html? For example, on one of my pages I wanted to create a table, but also use the WYSIWYG editor below the table. This would be cool if possible.
if you change this line in view.php:
if ($WT['doaction']=='text') {$includedtemplate=parse_bbcode2($WT['template'],0,1,1,1);}
as
if ($WT['doaction']=='text') {$includedtemplate=parse_bbcode2($WT['template'],1,1,1,1);}
this should do what you wanted.
SVTOA
04-09-2005, 12:34 PM
Outstanding work. No question.
In testing, there is no conflict of any kind with regard to using other portal software such as VBA. If you get creative with this add-on, there's a lot you can do with it. Example- you could use this for articles and such; with a more customizable format. You can index them by creating a new "forum" called "Articles" and then make the webtemplates into links. One suggestion I would add is if you have a board with multiple stylesets, you might also want to install ZeroTolerance's "Copy Templates from one style to another" hack. (https://vborg.vbsupport.ru/showthread.php?t=72288) Then you can copy the webtemplates required when this is first installed to all your styles very quickly.
Anyway, this is great work you have done here Logician.
Robert Basil
04-14-2005, 08:24 AM
How do I use a webquery to query two different tables?
I want to include the forum's name in the last post header.
I tried:
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext
FROM " . TABLE_PREFIX . "thread t
LEFT JOIN " . TABLE_PREFIX . "post p ON p.postid = t.firstpostid
WHERE t.forumid In(108,109)
AND t.open = '1'
AND t.visible = '1'
ORDER BY t.dateline DESC
LIMIT 0 , 10
SELECT forumid, title, description, displayorder
FROM " . TABLE_PREFIX . "forum
WHERE forumid In(108,109)
ORDER BY title ASC
LIMIT 100
But it did not work.
And even if I do get both query's to work when I output them in the Query Results Row both Query's assign a value to the $WQfield[title] variable.
Any ideas how to get both query's to work and assign them the "title" variable to different names?
Thanks in advance, this is a great hack!
Logician
04-14-2005, 11:03 AM
How do I use a webquery to query two different tables?
I want to include the forum's name in the last post header.
I tried:
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext
FROM " . TABLE_PREFIX . "thread t
LEFT JOIN " . TABLE_PREFIX . "post p ON p.postid = t.firstpostid
WHERE t.forumid In(108,109)
AND t.open = '1'
AND t.visible = '1'
ORDER BY t.dateline DESC
LIMIT 0 , 10
SELECT forumid, title, description, displayorder
FROM " . TABLE_PREFIX . "forum
WHERE forumid In(108,109)
ORDER BY title ASC
LIMIT 100
But it did not work.
And even if I do get both query's to work when I output them in the Query Results Row both Query's assign a value to the $WQfield[title] variable.
Any ideas how to get both query's to work and assign them the "title" variable to different names?
Thanks in advance, this is a great hack!
Make a LEFT JOIN in first query:
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, f.title, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext
FROM thread t
LEFT JOIN post p ON p.postid = t.firstpostid
LEFT JOIN forum f ON f.forumid = t.forumidpostid
WHERE t.forumid
IN ( 108, 109 )
AND t.open = '1'
AND t.visible = '1'
ORDER BY t.dateline DESC
LIMIT 0 , 10
Robert Basil
04-14-2005, 11:08 AM
Make a LEFT JOIN in first query:
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, f.title, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext
FROM thread t
LEFT JOIN post p ON p.postid = t.firstpostid
LEFT JOIN forum f ON f.forumid = t.forumidpostid
WHERE t.forumid
IN ( 108, 109 )
AND t.open = '1'
AND t.visible = '1'
ORDER BY t.dateline DESC
LIMIT 0 , 10
Thanks for the fast response!
So to pull the info can I just use $WQfield[t.title] and $WQfield[f.title] ?
Logician
04-14-2005, 11:10 AM
Thanks for the fast response!
So to pull the info can I just use $WQfield[t.title] and $WQfield[f.title] ?
ok let's change the query like this:
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, f.title as forumtitle, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext
FROM thread t
LEFT JOIN post p ON p.postid = t.firstpostid
LEFT JOIN forum f ON f.forumid = t.forumidpostid
WHERE t.forumid
IN ( 108, 109 )
AND t.open = '1'
AND t.visible = '1'
ORDER BY t.dateline DESC
LIMIT 0 , 10
now $WQfield[title] gives you thread title and $WQfield[forumtitle] gives you forum title. ;)
Robert Basil
04-14-2005, 12:07 PM
ok let's change the query like this:
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, f.title as forumtitle, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext
FROM thread t
LEFT JOIN post p ON p.postid = t.firstpostid
LEFT JOIN forum f ON f.forumid = t.forumid
WHERE t.forumid
IN ( 108, 109 )
AND t.open = '1'
AND t.visible = '1'
ORDER BY t.dateline DESC
LIMIT 0 , 10
now $WQfield[title] gives you thread title and $WQfield[forumtitle] gives you forum title. ;)
You have a typo above.
LEFT JOIN forum f ON f.forumid = t.forumidpostid
Should be:
LEFT JOIN forum f ON f.forumid = t.forumid
After fixing the typo it works great, thanks!
Robert Basil
04-14-2005, 12:13 PM
Here is how I am using your script. Everything on the page is pulled from the database using your script (except for the racing map)
http://www.pocketbikeplanet.com/view.php?pg=racing
I'm also using it for other areas of the site as well.
I've been a VB admin for over 4 years now and this is by far my favorite script. :)
P.S. To others using this script, please don't send me PM's or Email's for help. Post you questions in this thread and I'll try and help.
Spinball
04-14-2005, 01:57 PM
I don't get your problem exactly. All I'm saying is that IF your webtemplate is "PHP parsed" you can NOT include any header and footer in it, otherwise you'd get PARSE error. (This is also stated in help document). Headers and footers are for "TEXT" or "HTML" parsed webtemplates.
If your webtemplate is already TEXT or HTML parsed but you still get an parse error, then paste the content of your header and webtemplate that gives the error and I'll check.
So how do you get the header and footer displayed on a page if the template is PHP?
I have created a template which does a standard search of a database and displays the results. Problem is that there is no header and footer like there is with HTML pages.
Robert Basil
04-14-2005, 07:50 PM
How do I tell the code below to show the last 3 posts from each forum and sort them by forum?
This is what I have so far...
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, f.title as forumtitle, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext, t.iconid, t.forumid
FROM thread t
LEFT JOIN post p ON p.postid = t.firstpostid
LEFT JOIN forum f ON f.forumid = t.forumid
WHERE t.forumid
IN ( 19, 116 )
AND t.open = '1'
AND t.visible = '1'
ORDER BY forumtitle DESC
LIMIT 0 , 3
Robert Basil
04-15-2005, 10:54 PM
Just an update on my progress...
I tried using the code:
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, f.title as forumtitle, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext, t.iconid, t.forumid
FROM thread t
LEFT JOIN post p ON p.postid = t.firstpostid
LEFT JOIN forum f ON f.forumid = t.forumid
WHERE t.forumid
IN ( 19, 116 )
AND t.open = '1'
AND t.visible = '1'
GROUP BY f.title
ORDER BY forumtitle DESC
LIMIT 0 , 3
The code above does two things that confuse me. (Keep in mind I am a very novice mySQL guy, so I am easily confused) ;)
#1. It only grabs one thread from each forum. (2 threads total on the page even though the limit is set to 3)
#2. The thread that it grabs is the oldest thread, not the newest one.
I've tried so many different query's I'm about ready to pull my hair out. Any ideas Logician??
Marco van Herwaarden
04-16-2005, 06:33 AM
This is an extreme difficult thing to do in just 1 query. I have seen your other post about this also, but didn't have a brainwave for a solution yet. Maybe when i wake up. :D
Spinball
04-16-2005, 09:04 AM
You're only getting two rows in your result because your are grouping by forum and you are selecting from 2 forums.
I don't have a quick solution either. But I would start looking at nested selects, maybe.
Robert Basil
04-16-2005, 10:00 AM
This is an extreme difficult thing to do in just 1 query. I have seen your other post about this also, but didn't have a brainwave for a solution yet. Maybe when i wake up. :D
Any help you can provide would be great! Thanks!
Robert Basil
04-16-2005, 10:02 AM
You're only getting two rows in your result because your are grouping by forum and you are selecting from 2 forums.
I don't have a quick solution either. But I would start looking at nested selects, maybe.
Well, you lost me as soon as you said "nested selects". ;)
I admit I'm way over my head here with mySQL query syntax knowledge.
Spinball
04-17-2005, 11:39 AM
Well, you lost me as soon as you said "nested selects". ;)
I admit I'm way over my head here with mySQL query syntax knowledge.
Short term visit the MySQL website, longer term, buy a book. Or go on a course. I have been fortunate enough to have been sent on about 3 SQL courses at Oracle in Reading (UK) by my previous employer and if you make money from your board then taking the time/money to amass some SQL knowledge will be a worthwhile investment.
Logician - any help on my question above, please?
Marco van Herwaarden
04-17-2005, 05:18 PM
Nested selects also will not do this trick i think.
Robert Basil
04-17-2005, 07:59 PM
Even if I could get the query to display the latest single post in each forum and then sort by forum name I would be happy.
Right now I can get it to display a single post from each forum and sort by forum, but it's displaying the oldest post in the forum and not the latest.
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, f.title as forumtitle, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext, t.iconid, t.forumid
FROM thread t
LEFT JOIN post p ON p.postid = t.firstpostid
LEFT JOIN forum f ON f.forumid = t.forumid
WHERE t.forumid
IN ( 19, 116 )
AND t.open = '1'
AND t.visible = '1'
GROUP BY f.title
ORDER BY forumtitle DESC
LIMIT 0 , 3
Marco van Herwaarden
04-17-2005, 08:09 PM
Maybe add a ORDDR BY t.dateline DESC to it
Robert Basil
04-18-2005, 04:09 AM
Maybe add a ORDDR BY t.dateline DESC to it
Tried that but the query does not like 2 ORDER BY lines.
I also tried removing the ORDER BY line and adding:
ORDER BY t.dateline ASC
or
ORDER BY t.dateline DESC
Both lines in the query still bring up the oldest (first) thread in the forum and not the latest thread. :disappointed:
Marco van Herwaarden
04-18-2005, 07:29 AM
Change ORDER BY forumtitle DESC To:ORDER BY t.dateline DESC, forumtitle DESC
Robert Basil
04-18-2005, 07:56 AM
When I use:
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, f.title as forumtitle, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext, t.iconid, t.forumid
FROM thread t
LEFT JOIN post p ON p.postid = t.firstpostid
LEFT JOIN forum f ON f.forumid = t.forumid
WHERE t.forumid
IN (82,89,83,134,135,136,13,14,23,16,17,18,20,21,22,2 4,130,129,125,116,19)
AND t.open = '1'
AND t.visible = '1'
GROUP BY f.title
ORDER BY t.dateline DESC, forumtitle DESC
LIMIT 0 , 100
The forums are not in order and the posts are not the last posts.
When I use:
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, f.title as forumtitle, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext, t.iconid, t.forumid
FROM thread t
LEFT JOIN post p ON p.postid = t.firstpostid
LEFT JOIN forum f ON f.forumid = t.forumid
WHERE t.forumid
IN (82,89,83,134,135,136,13,14,23,16,17,18,20,21,22,2 4,130,129,125,116,19)
AND t.open = '1'
AND t.visible = '1'
GROUP BY f.title
ORDER BY t.dateline ASC, forumtitle DESC
LIMIT 0 , 100
The forums are in order but it's still showing the first posts (not the latest ones).
Logician
04-18-2005, 10:27 AM
@Sportbikeworld : I don't think it is possible to grab the data you want with one query. I'd suggest to give up and use multiple webqueries to compile this data. I think you don't want to increase the query count of your webtemplate with a single query for each forum but this shouldn't cause a big performance problem so try it.
@Spinball : Webtemplate PHP parsing is exactly same as vbulletin's PHP parsing in phpinclude template and you are not able to use the other webtemplate features in a PHP parsed webtemplate like automatic header/footer inclusion. However you should consider:
a) If your PHP code is basic : Make your webtemplate parsing TXT or HTML (instead of PHP) and run your PHP code inside PHP parsed template of webtemplate.
b) If your PHP code is advanced : Grab vb header and footer inside your PHP code with PHP commands as well like:
eval('$headinclude = "' . fetch_template('headinclude') . '";');
eval('$header = "' . fetch_template('header') . '";');
eval('$footer = "' . fetch_template('footer') . '";');
Robert Basil
04-18-2005, 10:45 AM
@Sportbikeworld : I don't think it is possible to grab the data you want with one query. I'd suggest to give up and use multiple webqueries to compile this data. I think you don't want to increase the query count of your webtemplate with a single query for each forum but this shouldn't cause a big performance problem so try it.
Darn, I have over 150 forums and need to query just about all of them. I was hoping to not have to re-enter a webquery for each one.
I wish you had a way to copy a default query over and over in the admin area.
Thanks for the help though. Still very happy with the hack. :)
Spinball
04-18-2005, 04:05 PM
@Spinball : Webtemplate PHP parsing is exactly same as vbulletin's PHP parsing in phpinclude template and you are not able to use the other webtemplate features in a PHP parsed webtemplate like automatic header/footer inclusion. However you should consider:
a) If your PHP code is basic : Make your webtemplate parsing TXT or HTML (instead of PHP) and run your PHP code inside PHP parsed template of webtemplate.
b) If your PHP code is advanced : Grab vb header and footer inside your PHP code with PHP commands as well like:
eval('$headinclude = "' . fetch_template('headinclude') . '";');
eval('$header = "' . fetch_template('header') . '";');
eval('$footer = "' . fetch_template('footer') . '";');
Thanks, Logician.
I did as you suggested and got a header and footer. No navbar, page title or page in a category table, though.
What I want to do is run a fairly complex PHP script which allows people to search for a make & model of DVD player, read the hacks for it, comment and provide feedback on those hacks and submit and edit new ones.
All while maintaining the logged-in appearance of the forums. I want to write the user id to any comments/hacks records they contribute and display their user name from the vB database in the displayed records.
Now writing that script is well within my capabilities. Having it all happen within the forum 'environment' is not.
Help!
Thanks.
cessna140
04-21-2005, 05:35 PM
Hey Logician!
Got the following error when trying to update the database. Ran it both ways. Know what this means?
==============
Error
SQL-query :
--
MySQL said:
#1064 - You have an error in your SQL syntax near '--' at line 1
===============
Clark
Logician
04-21-2005, 05:41 PM
Hey Clark, :)
Got the following error when trying to update the database. Ran it both ways. Know what this means?
You run the query in phpmyadmin right?
cessna140
04-21-2005, 06:00 PM
Hey Clark, :)
You run the query in phpmyadmin right?
Yes I did, as per your instructions. Any ideas?
FYI I am running the following:
Welcome to phpMyAdmin 2.5.7-pl1
MySQL 3.23.58-log
T3MEDIA
04-21-2005, 08:43 PM
As the LORD is my witness this conditionls are murder. anyone has a template already made up of say a users page? Im trying to make a simple welcome page. Has the users avatar some links... bout it.
But WOAH... I thought grab the memberinfo template and work from that.
I am so lost in the [[()]] world of things it doesnt even make sense!
PLEASE if you guys have any templates at all be ever so kind and share them.
Thank you.
Moncal
04-25-2005, 01:01 AM
*Clicks Install*
Great Hack!
Logician
04-25-2005, 07:18 AM
Yes I did, as per your instructions. Any ideas?
FYI I am running the following:
Welcome to phpMyAdmin 2.5.7-pl1
MySQL 3.23.58-log
Maybe you can give me the URL and access and I can check.
cessna140
04-25-2005, 06:42 PM
Maybe you can give me the URL and access and I can check.
I just deleted all of the comments from the query file and copied that over and ran it. Worked fine. I am now fiddling with it to see what I can make it do! :nervous:
Thanks!
Clark
JohnBee
05-10-2005, 01:07 AM
Hello first off!
Let me say thank you for this great release! .thumsbup.
I am overwhelmed by the flexibility and potential this addon has.
I have been thinking of designing vB power pages but with custom content or
layout from some custom vB styles, is there a way to call a certain style from
within a them or otherwise?
Say I have 2 navbars 1 for my forum and 1 for my support sections.
I would like to call on a theme designed with my support forum styles in effect.
but the members do not choose these styles, they would be included as a way to
enforce layout changes for a page instead.
How could I do this?
Logician
05-10-2005, 02:20 PM
Hello first off!
Let me say thank you for this great release! .thumsbup.
I am overwhelmed by the flexibility and potential this addon has.
I have been thinking of designing vB power pages but with custom content or
layout from some custom vB styles, is there a way to call a certain style from
within a them or otherwise?
Say I have 2 navbars 1 for my forum and 1 for my support sections.
I would like to call on a theme designed with my support forum styles in effect.
but the members do not choose these styles, they would be included as a way to
enforce layout changes for a page instead.
How could I do this?
Not tested but I believe putting
$styleid = X;
in webtemplates phpinclude field should do the trick.
T3MEDIA
05-12-2005, 12:35 PM
I am making a basic edit profile page. I am curious how do I pull the predefined variables.
Here is what I have created so far:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle] - Edit Profile</title>
$headinclude
</head>
<body>
$header
<br />
<form action="register.php" name="register" method="post" onsubmit="return verify_passwords(password, passwordconfirm);">
<input type="hidden" name="s" value="$session[sessionhash]" /><input type="hidden" name="do" value="updateprofile" />
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead">$vbphrase[additional_required_information_option]</td>
</tr>
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div style="width:$stylevar[formwidth]" align="$stylevar[left]">
$customfields_option
</div>
</div>
</td>
</tr>
</table>
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead">$vbphrase[additional_information]</td>
</tr>
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div style="width:$stylevar[formwidth]" align="$stylevar[left]">
$customfields_other</div>
</div>
<div style="margin-top:$stylevar[cellpadding]px">
<input type="submit" class="button" value="Save Changes" accesskey="s" /><input type="reset" class="button" name="Reset" value="$vbphrase[reset_fields]" /></div>
</td>
</tr>
</table>
</form>
$footer
</body>
</html>
She works but of course certain variables like $customfields_other do not show.
What do I add? a SQL query? a PHP include?
Thanks.
Stachel
05-17-2005, 11:09 AM
Oh my GOD what an incredibly useful add-on.
First impressions:
1) Now *what* exactly does this do?
Ohhhhhhhh OK! The instructions and introductoin were actually helpful to this newbie.
The repetition in explaining what it does was helpful as well. Thank you for making it very clear!
With most hacks, I'm trying to figure out "where is the purpose?" for a lot longer than with yours.
2) What an easy installation!
3) WOW I created a "Hello World" page just perfectly.
Hats-off to you for an elegant result.
Stachel
JohnBee
05-17-2005, 12:26 PM
I have to agree with you here!
This addon is so exciting that I will post yet another compliment to the maker.
Since I dicovered this little gem my head has been spinning whilst on the pillow
I can't stop thinking of ways to make it work for my support forums.
The only thing I wish it had was stronger intergration towards a front page
system because other than the url I see no reason why this couldn't deliver
the perfect CMS system homepage included.
Oh and if the coder is in the mood to consider it making the $functions line up
with vbull.'s default would be a nice touch, not that it matters in functionality
jus thought I would mention it ;)
Stachel
05-18-2005, 12:48 PM
1) Does anyone have any good examples of pages they've created with WebTemplates?
2) If I use this, do I need vBAdvanced?
It's not easy to tell where one thing picks up where the other one leaves off... (before installing and working with both for a while)
Stachel
neocorteqz
05-18-2005, 02:59 PM
1) Does anyone have any good examples of pages they've created with WebTemplates?
2) If I use this, do I need vBAdvanced?
It's not easy to tell where one thing picks up where the other one leaves off... (before installing and working with both for a while)
Stachel
I'm using it for
A server status page using the Q3PX plugin
A Forum Stats page
And for a unfinished Cams portal page. :)
Logician
05-18-2005, 06:03 PM
1) Does anyone have any good examples of pages they've created with WebTemplates?
Eg. try here : http://www3.fertilethoughts.com/forums/view.php?pg=infertility_mainpage
Most of the links in that webtemplate are also webtemplates so you can follow them. It is also a good example of theme usage.
For more examples search "Logician Webtemplates" in google and you'll find some others.
2) If I use this, do I need vBAdvanced?
Although I don't have experience with vbadvanced, I know that it is a powerful portal. Webtemplates is not exactly a portal as it does not give you a site main page (see FAQ). So if you have a sitemain page or don't care about one, IMO use webtemplates. If you want a site main page solution use vbadvanced. Or better use both. :)
JohnBee
05-18-2005, 08:58 PM
Logician
Not tested but I believe putting
PHP Code:
$styleid = X;
in webtemplates phpinclude field should do the trick.
I finally had the chance to try this out, it does nothing that I can see as far
as applying a specific vbulletin style to a webtemplate. Might I of forgotten
a setting that would be needed to go along with this?
JohnBee
05-18-2005, 09:06 PM
I take that back ;)
I thought it didn't work because when I would return to the forums without
re-applying default style it would inherit and keep the $styleid I would put in the
webtemplate.
Is there a way to apply a style only for one page?
ex: as it is, if the user leaves and returns that style will remain so if I rely on that
style to format aspects of the forum or individual pages it really messes things up.
d3nnis
05-20-2005, 01:52 AM
is WebTemplates able to output as htm files? Currently I am using htm version of vbulletin.
Logician
05-20-2005, 05:46 AM
is WebTemplates able to output as htm files?
nope
TopeeGuy
05-20-2005, 06:32 PM
Is it possible to allow Mods to create/edit/delete pages?
Logician
05-21-2005, 08:49 AM
Is it possible to allow Mods to create/edit/delete pages?
only admins can create/delete webtemplates but mods (or any usergroup you grant permission) can edit the content via WYSIWYG editor.
T3MEDIA
05-21-2005, 01:49 PM
Awsome software.
Is it ok to release the template you 80% helped me create?
Logician
05-21-2005, 06:58 PM
Awsome software.
Is it ok to release the template you 80% helped me create?
Sure thing.
RichieBoy67
05-21-2005, 07:59 PM
Logician.... I love this hack by the way!!! Great job... One of the best out there!!
greenhybrid
05-21-2005, 09:16 PM
How does this script differ from vBadvanced CMPS?
Is truly beautiful and powerful, also if you say that is not make for a site, the my site is nearly all on the forum, therefore this is perfect and help me to also script php.
I think.... if it could be translate, would be available for the Italian... but currently it must make it on the file php, just?
Heheheh my English is not beautifulst
Hello and thanks
hambil
05-25-2005, 06:47 PM
Exceptional hack. I was able to use this to build a highly customized ezine/portal instead of having a portal that looked like every other one in the vb world. It saved me countless time. Thank you, and great work.
hambil
05-25-2005, 06:49 PM
How does this script differ from vBadvanced CMPS?
You could probably build vBadvanced with this hack.
greenhybrid
05-27-2005, 06:17 AM
Is there a way for non-admin users to have designated pages they can edit?
BigIke
05-30-2005, 06:37 PM
I would like a special menu to appear on the left side of the page that I created. In the vBadvanced instructions, it says to
4. Now you will want to open your /forums/index.php file. In that file, right after the opening <?php tag, you will want to add this code:
define('VBA_PORTAL', true);
define('VBA_PAGE', 'include');
Note that if you changed the 'Page Identifier' setting for this page above then you will want to replace 'include' (marked in bold above) to whatever you used for the 'Page Identifier' option.
5. For the next step, you will want to search your file for the phrase "print_output" (without the quotes). In our example here, you would find the following code:
eval('print_output("' . fetch_template('FORUMHOME') . '");');
You will want to replace this with:
eval('$HTML = "' . fetch_template('FORUMHOME') . '";');
print_portal_output($home, $HTML);
As you can see, the main part that you should be concerned with is 'FORUMHOME'. When integrating other vBulletin pages or hacks with vBadvanced CMPS, you will want to replace whatever template name is in the "print_output" part of the code. Once you have done this, save and upload your file, and you're done.
In the view.php file, what do I edit to replace the
eval('$HTML = "' . fetch_template('FORUMHOME') . '";'); with? Thanks in advance
greenhybrid
05-30-2005, 10:11 PM
Gee. I just installed and that admin page looks pretty confusing. Gotta sort through everything now and see what this hack is all about :(
greenhybrid
05-30-2005, 10:15 PM
Are there any instructions for this?
Logician
05-31-2005, 07:37 AM
Are there any instructions for this?
I believe this is one of the most documented vb hacks ever. It has 2 extensive help files (they are also webtemplates so click "view" to read them) and also a large FAQ in the beginning of this thread. Have you read them?
Pain86
05-31-2005, 08:06 PM
i get this error @ /admincp/webtemplate.php
Database error in vBulletin 3.0.7:
Invalid SQL: SELECT wtid,title,pagecount,category,doaction,draft,forpa id,template FROM wt2_templates WHERE headerfooter=0 ORDER BY category DESC, title ASC
mysql error: Table 'bodybuil_body.wt2_templates' doesn't exist
Logician
05-31-2005, 08:31 PM
i get this error @ /admincp/webtemplate.php
Database error in vBulletin 3.0.7:
Invalid SQL: SELECT wtid,title,pagecount,category,doaction,draft,forpa id,template FROM wt2_templates WHERE headerfooter=0 ORDER BY category DESC, title ASC
mysql error: Table 'bodybuil_body.wt2_templates' doesn't exist
Make sure you run the SQL queries in the installation all ok and via phpmyadmin.
Pain86
05-31-2005, 08:53 PM
ok i got it
BigIke
05-31-2005, 10:24 PM
Any ideas Logician for the left menu edits in the view.php file?
Logician
06-01-2005, 08:45 AM
Any ideas Logician for the left menu edits in the view.php file?
Sorry I don't have any experience with vbadvanced
A suggestion... how about a 'Copy Webtemplate/Webquery' link/button?
:)
This thing rules, by the way.
T3MEDIA
06-01-2005, 03:37 PM
Off the top of your head what is the differnce from using your hack and say...
misc.php?do=page&template=xxxxx
Where misc.php will call template custom_xxxxx.?
I used this for my own fancy smancy login page
Logician
06-01-2005, 06:32 PM
Off the top of your head what is the differnce from using your hack and say...
misc.php?do=page&template=xxxxx
Where misc.php will call template custom_xxxxx.?
* apply vb permissions per userid/usergroupid
* make template draft or private easily
* visitor log
* visitor counter
* WYSIWYG editor support for any usergroup
* Page Browsers Display
* Who is Online Display
* custom header/footer inclusion
* custom themes support
* Admin Panel while viewing Webtemplate
* webquery support for advanced programming
* Outside Variables support for HTTP_GET and HTTP_POST
* Pre-defined themes
* PHPinclude support per page
* Text parsing support (for smilies, bbcode etc.)
* PHP parsing support
* Predefined and formatted default variables
kahethu
06-03-2005, 05:50 PM
I've been agonizing over this for hours; however I do not seem to be able to access the VB WYSIWYG editor.
I've created a template as admin, then set supermods to be able to edit it.
When I try as supermod, I just see a blank page.
I also see this:
a) That is your set bbcode interface in your usercp
b) The webtemplate is a "TEXT" parsed webtemplate
where can I set a) above?
what else could I be doing wrong?
Bad Bunny
06-05-2005, 11:35 PM
This is great. I'm running it on a test, and I may go further, depending on how easy it is to get it to do the things I would like it to. :paranoid:
Right now what I'm looking to be able to do is edit the vb header so that it will display a little bit of different code for different pages. It is done with a this_page conditional (or something like that! lol) with vb pages. My question for you is how would I go about building a conditional to identify a web template page?
Is this even possible?
Right now the only reason (and I do mean only reason) I am using a competing cms is because I can do this very thing. If I can do it with yours, I would be glad to port my site over.
BigIke
06-12-2005, 10:13 PM
Logician-
Sorry for bugging you about this, but in the vbadvanced instructions, it says that if you want to view modules on a page such as one created by your hack, we have to search for something like this:
eval('print_output("' . fetch_template('FORUMHOME') . '");');
then replace it with something like this:
eval('$HTML = "' . fetch_template('FORUMHOME') . '";');
print_portal_output($home, $HTML);
Then the instructions sayAs you can see, the main part that you should be concerned with is 'FORUMHOME'. When integrating other vBulletin pages or hacks with vBadvanced CMPS, you will want to replace whatever template name is in the "print_output" part of the code. Once you have done this, save and upload your file, and you're done.
Do you know where I can put that code in the view.php file?
Logician
06-13-2005, 07:08 PM
Sorry for the late reply, I was away from town.
I've been agonizing over this for hours; however I do not seem to be able to access the VB WYSIWYG editor. I've created a template as admin, then set supermods to be able to edit it. When I try as supermod, I just see a blank page.
Sounds like a template problem. Make sure you installed STEP 1 correctly. (all templates created in ALL style sets)
I also see this:
a) That is your set bbcode interface in your usercp
b) The webtemplate is a "TEXT" parsed webtemplate
where can I set a) above?
what else could I be doing wrong?
Not understood? Please rephrase.
Logician
06-13-2005, 07:11 PM
Right now what I'm looking to be able to do is edit the vb header so that it will display a little bit of different code for different pages. It is done with a this_page conditional (or something like that! lol) with vb pages. My question for you is how would I go about building a conditional to identify a web template page?
Is this even possible?
The webtemplate allows you to use different headers/footer in every webtemplate. As a matter of fact this is a default feature of this mod. So wouldn't be enough for you if you create different "webtemplates headers" and inherit them in any other webtemplate you like?
Alternatively you can use this conditional in your webtemplate:
[[($pg==test)]]
This is a webtemplate named "test"
[[/($pg==test)]]
Logician
06-13-2005, 07:15 PM
Logician-
Sorry for bugging you about this, but in the vbadvanced instructions, it says that if you want to view modules on a page such as one created by your hack, we have to search for something like this:
eval('print_output("' . fetch_template('FORUMHOME') . '");');
then replace it with something like this:
eval('$HTML = "' . fetch_template('FORUMHOME') . '";');
print_portal_output($home, $HTML);
Then the instructions say
Do you know where I can put that code in the view.php file?
The section you mention is the part that says
eval('print_output("' . WTgettemplate ................
in view.php. (There are 2 of them)
Yet I highly doubt that adding that code there will make it work for you. The instruction you quoted, looks like clashing with webtemplate's structure as a first impression.
BigIke
06-14-2005, 10:57 PM
Oh ok. Thanks for the reply. I'll see if I can get it to work. :)
TopeeGuy
06-19-2005, 10:39 PM
Thanks for the great hack.
A question, I implemented the optional addon to show the person reading the webtemplate in the "Who's Online" page. However, it displays the webtemplate name of the page (with a small first letter). Is it possible to make it show the friendly name?
jluerken
07-06-2005, 07:16 AM
Will this hack work in vb3.5?
Bad Bunny
07-06-2005, 03:38 PM
No...
DarkDestinyD
07-10-2005, 09:18 AM
im getting this error when i view my test page and a similar error when i make a new page and try to view it any ideas
Fatal error: Call to undefined function: array_key_exists() in /nfs/cust/9/46/70/607649/web/GX/view.php on line 433
Logician
07-10-2005, 01:48 PM
im getting this error when i view my test page and a similar error when i make a new page and try to view it any ideas
Fatal error: Call to undefined function: array_key_exists() in /nfs/cust/9/46/70/607649/web/GX/view.php on line 433
Upgrade your PHP to version 4.1.0 (or higher)
OR
replace all "array_key_exists" as "key_exists" in the scripts.
bulbasnore
07-17-2005, 11:02 PM
First off, this looks like an awesome piece of work; congrats on your skills Logician.
I'd like to see if anyone here, with experience with webtemplate can tell me if it will help me implement a new feature on our site.
Our Site
vB3.0.7 with vBaCMPS1.0.1.
I have some custom & tweaked modules running in CMPS and we have the gallery. Great system.
New Feature
We're putting up a database driven guide with over 3000 entries for our members. You select the group to view with one form, then get back a page of results to update with the return and finally submit that back to a third form which gives your result. I'm using ADODB with DreamweaverMX/PhaKT to create the PHP database code. The forms are working fine and doing what I want.
Problem
Now the time is come to integrate with vB! However, vB isn't going to let me run php code.
OK, vBaCMPS module time! Well, that works for the first selection, but once I post that selection I have to drop out of vBaCMPS. No way to post back to it.
OK, require global.php, then load my other php code. Works great for the first form, restricts access, etc. However, global.php prevents you from accepting post/get input.
Questions
Can I just plunk my php database query and HTML generation code in the include section of webtemplate?
If so, how do I pick up the post info on an incoming form submission, and get it to that code I plunked in?
My php code talks to an external database. Is it just webqueries that are limited to the vB database, or does webtemplate/vb block even non-vb/template queires from included php code?
Am I better off to just try to make my own cookie from vB login and keep my pages external to vB/CMPS/webtemplate?
Well, if you got this far, thanks for reading. I'm amazed at how cool vB is; its a new world for me, but it really is saving me tons of time and helping get features out to our members. It just has some limits I'm not used to in free-coding (simple though mine is).
Cheers,
'snore
damonh
07-17-2005, 11:24 PM
Fantastic!!!!!
Now I jsut need to make them work for each user as they log in. Two thumbs up!
Installed Clicked!
Logician
07-18-2005, 04:59 AM
Can I just plunk my php database query and HTML generation code in the include section of webtemplate?
If so, how do I pick up the post info on an incoming form submission, and get it to that code I plunked in?
My php code talks to an external database. Is it just webqueries that are limited to the vB database, or does webtemplate/vb block even non-vb/template queires from included php code?
Am I better off to just try to make my own cookie from vB login and keep my pages external to vB/CMPS/webtemplate?
What you are trying to achieve is really sophisticated and I can not say if you can do it with webtemplates or not without trying it. However I'd urge you to try. Nothing to lose and it may work.
On theory it sounds like "doable". However my concern is that there can occur many unexpected drawbacks when you integrated your code. Some can be even unrelated to webtemplates: Eg. your variables can clash with vbulletin variables etc. So no way to say whether it will work or not without trying it.
As for your questions:
1- yes, sounds ok. If you put it into vb phpinclude template and it worked (except getting GET/POST VARIABLES successfully), it will work in phpinclude template of webtemplate.
2- You can use a webquery for this and use the phpinclude field of the webquery for the postid variable your code passes. It will return you the post info. However it will return it to the webtemplate, not your code (which is inside phpinclude of webtemplate!) so I don't know if it is ok with you.
3-webqueries can only query vb database. But if you use your own DB connection commands in your phpinclude field of webtemplates, they are not blocked so your commands can query other dbs. (again: provided that this strategy worked in the default phpinclude field of vb! If it does not work in vb's phpinclude field, it will not work in webtemplates's phpinclude field)
4- If it does not work, I still don't suggest you to use a seperate autentication for your application. I think your path should be copying vb global.php into another file, remove GET/POST variable blocking of it in your new file and include it in your application to simulate vb authentication. This sounds more logical. You can check webtemplates source code to see how it manages to accept variables vb global.php blocks.
Inzagi
07-18-2005, 09:24 PM
Is there a version of the hack for vb 3.5 or is it planned ?
bugzy
07-19-2005, 11:31 PM
This like an article system?
Spinball
07-23-2005, 07:55 PM
The number of page views doesn't seem to be incrementing for my webtemplates.
I have the 'Count page visitors?' set to 'Yes' and the 'Logged Visitors' to 0.
Any idea what's wrong?
Logician
07-25-2005, 07:55 AM
The number of page views doesn't seem to be incrementing for my webtemplates.
I have the 'Count page visitors?' set to 'Yes' and the 'Logged Visitors' to 0.
Any idea what's wrong?
Good catch of a bug!
Here is the fix:
Edit "view.php", find:
$DB_site->query("UPDATE $WT_DB_TemplateTable SET lastvisitorid='$bbuserinfo[userid]', lastvisittime='".time()."' WHERE wtid='$WT[wtid]'");
replace it as:
$DB_site->query("UPDATE $WT_DB_TemplateTable SET pagecount=pagecount+1, lastvisitorid='$bbuserinfo[userid]', lastvisittime='".time()."' WHERE wtid='$WT[wtid]'");
slim cutty
07-25-2005, 02:38 PM
$DB_site->query("UPDATE $WT_DB_TemplateTable SET lastvisitorid='$bbuserinfo[userid]', lastvisittime='".time()."' WHERE wtid='$WT[wtid]'");
in the above line that you were to replace you made a little typo you made a mistake and put this instead
$$DB_site->query("UPDATE $WT_DB_TemplateTable SET lastvisitorid='$bbuserinfo[userid]', lastvisittime='".time()."' WHERE wtid='$WT[wtid]'");
Thanks for the bug fix hope you update the view.php file before someone else downloads
Logician
07-25-2005, 03:37 PM
Thanks for the bug fix hope you update the view.php file before someone else downloads
Updated, thank you!
bulbasnore
07-27-2005, 01:02 AM
What you are trying to achieve is really sophisticated and I can not say if you can do it with webtemplates or not without trying it.
3-webqueries can only query vb database. But if you use your own DB connection commands in your phpinclude field of webtemplates, they are not blocked so your commands can query other dbs.
OK I finally installed your system on the test-board. Nice and easy, thanks. Love the built in help with the variables.
Here's how far I got:
Selection page (a.php) This db driven page loads its date for the selection drop down just fine. Yay!
Update Form (b.php) Alright, this page comes up blank, except for static text, but no errrors. In my php code I'm looking for this variable (adodb style): $HTTP_POST_VARS['formSetNo'] . It apparently isn't being passed, even though I put this HTTP_POST_VARS['formSetNo'] in your blank for "Outside Variables".
I'm guessing "Outside Variables" is expecting slightly different syntax OR "Outside Variables" can only pass info to some restricted part of the page.
Would you again steer me down the right path? If I can get this variable's value from the post, the problem is licked!
Again, my compliments on an easy install.
jluerken
07-27-2005, 06:26 AM
Is there a version of the hack for vb 3.5 or is it planned ?
I would like to know this also...
Logician
07-27-2005, 07:48 AM
OK I finally installed your system on the test-board. Nice and easy, thanks. Love the built in help with the variables.
Here's how far I got:
Selection page (a.php) This db driven page loads its date for the selection drop down just fine. Yay!
Update Form (b.php) Alright, this page comes up blank, except for static text, but no errrors. In my php code I'm looking for this variable (adodb style): $HTTP_POST_VARS['formSetNo'] . It apparently isn't being passed, even though I put this HTTP_POST_VARS['formSetNo'] in your blank for "Outside Variables".
I'm guessing "Outside Variables" is expecting slightly different syntax OR "Outside Variables" can only pass info to some restricted part of the page.
Would you again steer me down the right path? If I can get this variable's value from the post, the problem is licked!
Again, my compliments on an easy install.
Try to set your outside variable as "formSetNo" instead of "HTTP_POST_VARS['formSetNo']"
Logician
07-27-2005, 07:52 AM
Is there a version of the hack for vb 3.5 or is it planned ?
I don't have such a plan in the near future, however I believe webtemplates should work with vb3.5 either (not tested by me). Since it is a add-on, not a hack and it does not change any vb db tables, nor vb source coude, I don't think a 3.5 version is needed either. 3.5's pluggin support is for hacks which changes vb source code but webtemplates does not.
I can advise better after I checked 3.5 code myself (which I haven't done yet) but I'd encourage people to test a 3.5 installation as it shouldn't have any clash issues.
bulbasnore
07-29-2005, 11:19 PM
Try to set your outside variable as "formSetNo" instead of "HTTP_POST_VARS['formSetNo']"
Ah, thanks for the reply.
I tried this, but the missing piece for me was -
Don't try to read from the http_post_vars array. The value is passed DIRECTLY in the variable(s) you reserve in the outside variables link.
So, where my code was:
$somevar = $HTTP_POST_VARS['formSetNo']
if had to become
$somevar = $formSetNo;
So, my path was:
a.php - Select from a menu and post the selection as 'formSetNo' (normal form menu code).
b.php - set 'outside variables' to formSetNo in the control panel AND read from $formSetNo in the script
c.php - now here is the trick! There are about 200 variables that get created by b.php and posted to c.php (arrays of arrays). That is probably going to HAVE to be an outside form!!
harry1951
08-01-2005, 11:49 AM
If I run http://mywebsite.co/forum/admincp/webtemplate.php I get this error:
Warning: main(..\wt_options.php): failed to open stream: No such file or directory in \admincp\webtemplate.php on line 29
Fatal error: main(): Failed opening required '..\wt_options.php' (include_path='.;c:\php4\pear') in D:\mywebsite\www\forum\admincp\webtemplate.php on line 29
The OS = WinNT 4.0
I removed the if else statement and changed it to a direct require_once and then it works fine.
Bro_Joey_Gowdy
08-01-2005, 06:43 PM
Is this available for vb3.5.0 yet ?
bulbasnore
08-06-2005, 02:51 PM
Hey there! I now have WebTemplates installed on our production forum and will be moving the pages from the test board into it this weekend. That is the last use I have for our test board before I start testing our systems with 3.5, so when I get around to testing WT with 3.5 I'll let you know the results (probably not 'til late Sept).
I did some further exploration in this vast system and tried the priv_privatemessages template. This template is to return the last 30 pms on the board! However, it returns 30 pms, in an order I don't understand (database hash?).
Anyway, as I microscopic contribution to this vast system, I provide the code to to change the privatemessages example so it does give you the last 30. Insert the code in red into the $WQ_priv_privatemessages webquery.
SELECT pm.pmid, pm.pmtextid, pm.userid, pm.folderid, pm.messageread, pt.fromusername, pt.fromuserid, pt.title, pt.message, pt.touserarray, pt.dateline, u.username AS tousername
FROM " . TABLE_PREFIX . "pm pm
LEFT JOIN " . TABLE_PREFIX . "pmtext pt ON pm.pmtextid = pt.pmtextid
LEFT JOIN " . TABLE_PREFIX . "user u ON pm.userid = u.userid
WHERE pm.folderid = '0' order by pm.pmid DESC
LIMIT 0 , 30
Anyway, this is dangerous code, like any code! After I'm done putting up our price guide in WT, I think I'll adapt this example so that members can see their last 50 PMs on a page. We have people who make lots of trades and I imagine going one by one through their PMs to find where to send the requested items can be a pain. Seeing the last 30-50 at once will let them pick off the addresses and items in one scroll.
T3MEDIA
08-14-2005, 06:49 AM
Is there a way to make a very simple WOL varable? WOL as in Who's online on the whole site not just viewing the Logician's Webtemplates page. Like online.php. I used a iframe and put online.php in it but I do not want the header and footer (making a nice personals page). Any ideas if anyone is still into this?
Thanks in advance.
digitalJE5U5
09-02-2005, 07:57 PM
I installed the hack and everything went smooth. However, when I try and create a custom page with php, I am not getting the header and footer included.
Under the "theme" option , I have selected "default basic theme". The default VB form header and footer are included.
ex: echo "hi";
Gives me a plain white page with "hi". No header or footer.
If I change the parse method to TEXT and change nothing else, I get echo "hi"; just like it is supposed to look - inside a box with the header and footer, etc.
ANy help? What am I doing wrong?
Thanks,
/DJ
Logician
09-03-2005, 06:28 AM
I installed the hack and everything went smooth. However, when I try and create a custom page with php, I am not getting the header and footer included.
To include header and footer in PHP parsing, you need to add it to your code like this :
echo "$header";
echo "hi";
echo "$footer";
jluerken
09-03-2005, 07:53 AM
Will this work with 3.5 or will be an update available within short?
Logician
09-03-2005, 07:57 AM
Will this work with 3.5 or will be an update available within short?
I have no idea for both question. I haven't even yet downloaded 3.5
jluerken
09-08-2005, 08:50 AM
I have no idea for both question. I haven't even yet downloaded 3.5
Hi Ligician,
this is one of the most important hacks for me and I think for others also.
Many special pages were created and now, where the 3.5 release is coming close
it would be nice to have this hack updated.
Can you take time to do this?
This would be really excellent.
Logician
09-08-2005, 10:54 AM
This is one of the most important hacks for me and I think for others also.
Many special pages were created and now, where the 3.5 release is coming close
it would be nice to have this hack updated.
Can you take time to do this?
This would be really excellent.
I understand. But please note that my hack list is way too crowded (see my profile) and most of these hacks are quite complicated ones like webtemplates. I have even unofficially released hundreds (literally!) of other hacks in hack requests forum and I even get requests for them to be updated from time to time. As for my officially released hacks, some members are asking them to be ported from vb2.x to vb3.x and some vb 3.x to vb3.5. If I covered all these requests, believe me this would be a full time job. So unfortunately I can only work on these requests for these when I have a time. Sorry for the inconvenience..
jluerken
09-08-2005, 11:08 AM
I understand. But please note that my hack list is way too crowded (see my profile) and most of these hacks are quite complicated ones like webtemplates. I have even unofficially released hundreds (literally!) of other hacks in hack requests forum and I even get requests for them to be updated from time to time. As for my officially released hacks, some members are asking them to be ported from vb2.x to vb3.x and some vb 3.x to vb3.5. If I covered all these requests, believe me this would be a full time job. So unfortunately I can only work on these requests for these when I have a time. Sorry for the inconvenience..
We should try to clone you Logician :D
Pain86
09-11-2005, 04:51 PM
is there anyway to make links load on one page and not open a new window up?
NonCompare
09-13-2005, 09:33 AM
Is it possible using conditionals to have only one template(I named it articles) with dynamic-changing content. I just made a static left tmenu for my forum categories:
Introduction [forumid=1]
Articles [forumid=2]
Suggestions [forumid=3]
and so on.......
My initial moved was to have my left menu a link like:
<a href="/forums/view.php?pg=articles&forumid=1">Introduction</a>
<a href="/forums/view.php?pg=articles&forumid=2">Articles</a>
Now my problem is I don't know how to implement that so-called outside variables, so that when I click Articles(2), for example, it will go to view.php?pg=articles&forumid=2 and will display all threads that belong to Articles category. But remeber it use the same template, so if I click Introduction again, for example, it will go again to view.php?pg=articles&this_forumid_here_will_change_accordingly
Does anyone already done this. Please help me, I would greatly appreciate from you guys!
If I did not explain it thoroughly, kindly let me know.
Logician
09-13-2005, 01:34 PM
Now my problem is I don't know how to implement that so-called outside variables, so that when I click Articles(2), for example, it will go to view.php?pg=articles&forumid=2 and will display all threads that belong to Articles category. But remeber it use the same template, so if I click Introduction again, for example, it will go again to view.php?pg=articles&this_forumid_here_will_change_accordingly
If I understand it correctly, it sounds possible. You need to put "forumid" into "Outside Variables" section of your webtemplate.
Then create a new webquery that depends on this very $forumid variable. Eg.
-----------------
SELECT threadid, title, postusername,postuserid,dateline
FROM " . TABLE_PREFIX . "thread
WHERE sticky=0 AND visible=1 AND forumid='$forumid'
ORDER BY dateline DESC
LIMIT 10
---------------------
In this webquery also makes sure you enter this line to "Query PHPInclude Code" :
$forumid = intval($forumid);
Now you can include this webquery in your webtemplate and everytime you call your webtemplate with a new "$forumid" value, the content of it will change.
Is this what you wanted to achieve?
NonCompare
09-14-2005, 02:07 AM
Thanks for help I got it working already!
Great hack by great Logician!!! :ninja:
harry1951
09-14-2005, 08:58 AM
I'm wondering if I can make the folowing thing with this hack...
On my website I want to make an issue like discussion of the month.
First there is a block of text and thereunder just 1 forum. The whole thing must be protected so only logedin members can read the text and access the forum.
I tried to make this but it doesn't work. The users are prompted to login again even if they are logid in on vB.
I tried the following piece of php
<?php
require_once('forumdisplay.php?f=4');
?>
This does not work because forumdisplay.php needs the complete url.
Can somebody help me out???
Scribbller
09-20-2005, 06:59 AM
Just a question will the urls of pages be like http://www.mydomain.com/mypage.php or what?
Logician
09-20-2005, 07:48 AM
Just a question will the urls of pages be like http://www.mydomain.com/mypage.php or what?
It will be like http://www.mydomain.com/view.php?pg=mypage
NonCompare
09-21-2005, 08:20 AM
Do conditionals supported in webqueries?
Logician
09-21-2005, 02:00 PM
Do conditionals supported in webqueries?
No.. But you can use "Query PHPInclude Code" section with "if conditionals" if you need conditional usage in queries.
NonCompare
09-22-2005, 12:51 AM
OK! 'Coz I just want to have a conditional in the Query Result Row. I have come to this situation because of attachments. If there's no attachment, then there must be no <img> tag in the Query Result Row else it should be included.
Anyway, thanks for your response!
Icehawk002
09-29-2005, 12:21 PM
Everything appeared to go well other than an error returned on running the sql queries as follows
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ';
CREATE TABLE `wt2_queries` (
`qid` int(10) unsigned NOT N
Could someone please suggest what needs to be done. Thanks
jluerken
09-29-2005, 12:36 PM
Does anyone know if this hack is now also working with vB 3.5?
Logician
09-29-2005, 01:43 PM
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ';
CREATE TABLE `wt2_queries` (
`qid` int(10) unsigned NOT N
Please use PHPMYADMIN to run the query. Other tools can cause such problems.
Does anyone know if this hack is now also working with vB 3.5?
No it is not.. But hold on, as I'll port it to 3.5 soon. :)
Icehawk002
09-29-2005, 03:30 PM
Thank you
However, is it to run the queries from the vb admin panel are there any modifications to the syntax or for php version 4.3.4?
Logician
09-29-2005, 03:35 PM
However, is it to run the queries from the vb admin panel are there any modifications to the syntax or for php version 4.3.4?
Sorry, question not understood? The query to run list is too long so only phpmyadmin can run it correctly. Other tools such as vb admin cp query runner fails due to long queries. If this is not your question, please rephrase it.
jluerken
09-29-2005, 04:13 PM
No it is not.. But hold on, as I'll port it to 3.5 soon. :)
Hey Logician. this sounds good.
What does soon mean?
Today? This weekend? January 2006 :-) ?
Icehawk002
09-29-2005, 04:26 PM
That makes sense now thank you
Logician
09-29-2005, 07:00 PM
Hey Logician. this sounds good.
What does soon mean?
Today? This weekend? January 2006 :-) ?
I don't want to make promises because I may not commit if I got busy with my work. But my intention is to deal with its porting asap.
Icehawk002
10-02-2005, 12:54 PM
Hack installed and working :nervous:
I have some existing html pages and while I can easily produce these as Webtemplates I get just the original html and loose the integration like the nav bar etc - so its probably all very simple but is anyone interested in helping design a few webtemplates?
Icehawk002
10-03-2005, 10:56 AM
Wonder if anyone can help I am trying to position two IFRAMES side by side within a webtemplate using the code below (sorry not a coder barely computer literate somedays) the code below correctly places the first IFRAME but the second is pushed to the bottom of the page. ??????
<!-- INLINE FRAME -->
<TABLE cellpadding="0" cellspacing="0" border="0" class="iframe"><tr><td>
<IFRAME height="520" name="soundframe" src="window-welcome.htm" width="200" style="position:relative; left:10px; frameborder=0 scrolling="yes"></IFRAME>
</td></tr></table>
<!-- INLINE FRAME -->
<DIV>
<!-- INLINE FRAME -->
<TABLE cellpadding="0" cellspacing="0" border="0" class="iframe"><tr><td>
<IFRAME height="330" name="soundframe" src="../Library/wa2.htm" width="520" style="position:absolute; right:45px; frameborder=2 scrolling="yes"></IFRAME>
</td></tr></table>
<!-- INLINE FRAME -->
Thanks in advance
LeMans350z
10-07-2005, 03:30 PM
I don't want to make promises because I may not commit if I got busy with my work. But my intention is to deal with its porting asap.
Great Hack.
Any update on a time line?
Thanks!
Logician
10-07-2005, 03:34 PM
Great Hack.
Any update on a time line?
Thanks!
2-3 weeks I'd say (with no promises)
Scribbller
10-16-2005, 01:02 PM
Logician a question. Is there a way to force the page I make to use a certain style?
Logician
10-16-2005, 05:45 PM
Logician a question. Is there a way to force the page I make to use a certain style?
https://vborg.vbsupport.ru/showthread.php?p=655544&highlight=style#post655544
fn9mm
10-23-2005, 12:43 PM
2-3 weeks I'd say (with no promises)
Can hardly wait,.....
Seems like a great Mod
docvader
11-11-2005, 11:36 PM
Can hardly wait,.....
Seems like a great Mod
Logician, brilliant hack, and it was easy to install, but I'm getting this error when going through admincp on either query or template php file:
Warning: main(..\wt_options.php): failed to open stream: No such file or directory in /admincp/webtemplate.php on line 29
I'm sure that this is something simple. I get all the test pages without any problem, just can't access these admincp files.
I can see that this was addressed before, but I thought the hack was updated.
Any suggestions? Thanks!
rich
docvader
11-12-2005, 12:13 AM
Logician, brilliant hack, and it was easy to install, but I'm getting this error when going through admincp on either query or template php file:
I'm sure that this is something simple. I get all the test pages without any problem, just can't access these admincp files.
I can see that this was addressed before, but I thought the hack was updated.
Any suggestions? Thanks!
rich
Fixed it
Logician, you've got some backslash issues in the download file, around ..\wt_options.php.
Got rid of one of the periods, and turned the slash the other way.
Works very nicely. Brilliant hack. Thanks for working on this.
rich
Club3G
11-12-2005, 03:45 AM
This is absolutely my favorite hack, thank you Logician - I use it all over the place on several sites.
One question,
In Who's online, rather than "Reading Webtemplate: templatename", is it possible to return the user friendly name, rather than the template page name?
Logician
11-12-2005, 08:02 AM
This is absolutely my favorite hack, thank you Logician - I use it all over the place on several sites.
One question,
In Who's online, rather than "Reading Webtemplate: templatename", is it possible to return the user friendly name, rather than the template page name?
Please search in the the thread. I believe this is asked before and I provided the solution in this thread. :)
outlaw621
11-12-2005, 04:36 PM
Logican. Do you have any eta for the 3.5.1 port of this wonderful hack? My users as well as myself miss the great functionality this hack offers.
Club3G
11-13-2005, 02:49 AM
Please search in the the thread. I believe this is asked before and I provided the solution in this thread. :)
Searching "location" gets me this, which isn't really my question:
https://vborg.vbsupport.ru/showthread.php?p=630503&highlight=location#post630503
Searching 'online' I get:
This guy is working with iframes, not what I'm doing:
https://vborg.vbsupport.ru/showpost.php?p=755889&postcount=200
But I don't really see a clear cut answer. I could just be missing it, but if you do see it, or someone else sees it, please point me to it because I don't. :D
Logician
11-13-2005, 07:53 AM
Searching "location" gets me this, which isn't really my question:
https://vborg.vbsupport.ru/showthread.php?p=630503&highlight=location#post630503
Searching 'online' I get:
This guy is working with iframes, not what I'm doing:
https://vborg.vbsupport.ru/showpost.php?p=755889&postcount=200
But I don't really see a clear cut answer. I could just be missing it, but if you do see it, or someone else sees it, please point me to it because I don't. :D
I guess I didn't post it here then because I couldn't locate it myself too. Anyway, please try this:
(AFTER YOU APPLIED WHO IS ONLINE HACK STEP IN INSTALLATION INSTRUCTIONS!)
edit includes/functions_online.php, find:
// Logician Hack : Webtemplates
if (stristr(PHP_OS, 'win')) {require_once('..\wt_options.php');require_once('. .\wt_functions.php');}
else {require_once('../wt_options.php');require_once('../wt_functions.php');}
// Logician Hack : Webtemplates
replace it as:
// Logician Hack : Webtemplates
global $WT_Option_NameOFviewphp,$DB_site;
if (stristr(PHP_OS, 'win')) {require_once('..\wt_options.php');require_once('. .\wt_functions.php');}
else {require_once('./wt_options.php');require_once('./wt_functions.php');}
// Logician Hack : Webtemplates
find:
// Logician Hack : WebTemplates
if (preg_match("/(pg=)(.*)(&)/siU", $userinfo['location'], $l_match1) OR preg_match("/(pg=)(.*)$/siU", $userinfo['location'], $l_match2))
{
if ($l_match1[2]) {$lmatch=$l_match1[2];} else {$lmatch=$l_match2[2];}
if (substr($lmatch,0,5)=='priv_' AND $bbuserinfo['usergroupid'] != 6)
{
$userinfo['where'] = "<a href=\"$vboptions[forumhome].php?$session[sessionurl]\">$vboptions[bbtitle]</a>";
}
else
{
$userinfo['action'] = "Reading <b>WebTemplate:</b>";
$userinfo['where']= ' <a href="'.$WT_Option_NameOFviewphp.'?'.$session[sessionurl].'pg='.$lmatch.'" target="_blank">'.$lmatch.'</a>';
}
}
// Logician Hack : WebTemplates
replace it as:
// Logician Hack : WebTemplates
if (preg_match("/(pg=)(.*)(&)/siU", $userinfo['location'], $l_match1) OR preg_match("/(pg=)(.*)$/siU", $userinfo['location'], $l_match2))
{
if ($l_match1[2]) {$lmatch=$l_match1[2];} else {$lmatch=$l_match2[2];}
if (substr($lmatch,0,5)=='priv_' AND $bbuserinfo['usergroupid'] != 6)
{
$userinfo['where'] = "<a href=\"$vboptions[forumhome].php?$session[sessionurl]\">$vboptions[bbtitle]</a>";
}
else
{
$userinfo['action'] = "Reading <b>WebTemplate:</b>";
$wtinfo = $DB_site->query_first("
SELECT userfriendlyname FROM wt2_templates
WHERE title='".addslashes($lmatch)."'
");
if ($wtinfo['userfriendlyname']) {$wtname = $wtinfo['userfriendlyname'];} else {$wtname = $lmatch;}
$userinfo['where']= ' <a href="'.$WT_Option_NameOFviewphp.'?'.$session[sessionurl].'pg='.$lmatch.'" target="_blank">'.$wtname.'</a>';
}
}
// Logician Hack : WebTemplates
Logician
11-13-2005, 08:22 AM
Logican. Do you have any eta for the 3.5.1 port of this wonderful hack? My users as well as myself miss the great functionality this hack offers.
Sorry for the delay guys. I'm definetely working on it and I have progress.
carpefile
11-13-2005, 11:31 AM
Thats great to hear. This incredibly useful hack is one of the reasons I have delayed moving to 3.5. :)
outlaw621
11-13-2005, 11:05 PM
Sorry for the delay guys. I'm definetely working on it and I have progress.
Very good news. Can't wait for it's release. Keep up the fantastic work. A quick question about the 3.5.1 version when you release it. I exported all my files from teh 3.0.x version. Will I easily be able to import them into the new version or will I have to completly redo them from scratch?
Logician
11-14-2005, 08:25 AM
I exported all my files from teh 3.0.x version. Will I easily be able to import them into the new version or will I have to completly redo them from scratch?
You will be able to copy/paste their content to the new system since you exported them. Then most will work fine, however you may need to make a few tweaks especially regarding conditionals (if you use them). Due to high demand, I decided to implement vb3 default conditional syntax in new webtemplates, instead of my own conditional syntax.
outlaw621
11-14-2005, 10:05 AM
You will be able to copy/paste their content to the new system since you exported them. Then most will work fine, however you may need to make a few tweaks especially regarding conditionals (if you use them). Due to high demand, I decided to implement vb3 default conditional syntax in new webtemplates, instead of my own conditional syntax.
Sounds good. Can't wait.
Club3G
11-14-2005, 02:52 PM
I guess I didn't post it here then because I couldn't locate it myself too. Anyway, please try this:
Thank you very much! :D
ZGeek
11-18-2005, 12:17 AM
Sorry for the delay guys. I'm definetely working on it and I have progress.w000000000000tttt!!!!
Logician
11-19-2005, 06:39 AM
A kindly request for people who is waiting for 3.5.0 version of this hack:
Can you please visit this thread (https://vborg.vbsupport.ru/showthread.php?t=97795), subscribe there and also post and let me know you are there?
I like to keep in touch with you, get your opinions and also make some tests if you are upto. Thanks!
Logician
11-30-2005, 05:11 PM
For the status of 3.5 version, please read here:
https://vborg.vbsupport.ru/showthread.php?p=836913#post836913
T3MEDIA
12-15-2005, 04:12 PM
A kindly request for people who is waiting for 3.5.0 version of this hack:Quick question... I want to make a tips box... you know each time the page load that box will show a new tip.
Can I do that with just conditionals? The tips are really random...
Logician
12-15-2005, 04:19 PM
Quick question... I want to make a tips box... you know each time the page load that box will show a new tip.
Can I do that with just conditionals? The tips are really random...
Not really.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.