View Full Version : WebTemplates 3.5.x: VB Integrated CMS (Content Management System)
Logician
12-15-2005, 10:00 PM
(This hack is for vb version 3.5.x AND 3.6.x. For vb 3.0.x and 2.x see my profile for relevant threads.)
(For vb 3.7 version, please go to this thread (https://vborg.vbsupport.ru/showthread.php?t=186644))
"WebTemplates" is a vBulletin integrated Content Management System which allows you to create vb integrated "HTML" pages in your vb admin cp very easily. The pages can inherit your vbulletin skin/style, can recognize logged-in user, can be applied permissions per user or usergroup basis, can keep visit logs, hit counts and do many more.
WEBTEMPLATES 3.5.x BASIC FEATURES:
Very Easy Installation : Webtemplates can be installed to your board without modifying even a single vbulletin file. It is coded as an pluggin and supports phrase system for user interfaces.
Apply VB Permissions: You can ban any webtemplate to any user or usergroups easily. 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.
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/ON per webtemplate basis.
Visitor Logging&Tracking : You can track certain users' (by usergroup or userid) webtemplate visits to see who visited a webtemplate and when. This is configurable per webtemplate basis.
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 & Who is Online Display: Webtemplates can display who is browsing that webtemplate while visitor is reading them (like default forum browse display of vbulletin). Webtemplate visits can also be monitored in who is online page.
Header/Footer Inclusion : Webtemplates can automatically use headers/footers (your default vb header/footer or custom ones)
Help Documents : The script comes with an extensive help document.
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.
SEO friendly URLs: You can make webtemplate URLs seo friendly in vb settings (Requires apache server).
XML Import/Export : XML Import/Export feature allows you to backup your webtemplates and use other hack users webtemplates in your board. ADVANCED FEATURES FOR ADVANCED USERS:
Webquery Feature : With advanced "webquery" feature you can 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 supports VB3 template conditionals so you can design webtemplates which change their display under different conditions.
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.Sample WebTemplates from Sites using this hack:
(Some 3.5 and some are 3.0 versions but WebTemplate look and feel didn't change much so both will give you the idea)
http://www.leatherneck.com/forums/view_aboutus.htm
http://www.hystersisters.com/vb2/view_funding.htm
http://www.theadminzone.com/forums/view.php?pg=aboutus
http://www.hystersisters.com/vb2/view_guidelines.htm
http://www.hystersisters.com/vb2/view_books.htm
http://www3.fertilethoughts.com/forums/view.php?pg=acronyms
http://www.makeuptalk.com/forums/view.php?pg=makeuptalk-newsletter
http://www.bklab.com (entire site is designed with Webtemplates only!)
3.5 version Admin CP screenshot attached to this post. 3.0.x screenshots (here (https://vborg.vbsupport.ru/attachment.php?attachmentid=24011) and here (https://vborg.vbsupport.ru/attachment.php?attachmentid=24012)) also still applies for this version.
If you use the hack, clicking here (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=103076) 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=103076) if you use it. Thank you..
Note in 6.August. 2006 : I've tested Webtemplates with vbulletin 3.6.0 gold version and they are compatible. So this hack released here is both for vb 3.5.x AND 3.6.x
Note for vb 3.7.x : (29.July.2008): For vb 3.7.x, I released a new version here:
https://vborg.vbsupport.ru/showthread.php?t=186644 (https://vborg.vbsupport.ru/showthread.php?t=186644)
Version Updates:
16.Dec.2005 - > Version 3.5.01
* Hack released.
16.Dec.2005 - > Version 3.5.02
* A webquery bug fix for boards which use table_prefix. To upgrade just overwrite hack .php files.
17.Dec.2005 - > Version 3.5.03
* A minor bug in WOL page fixed. To upgrade overwrite hack .php files + reinstall product XML
17.Dec.2005 - > Version 3.5.04
* A bug fix for edit webtemplate page not remembering webtemplate's showbrowsers setting.To upgrade overwrite hack .php files
16.Jan.2006 - > Version 3.5.05
* A bug fix for boards which has too many usergroups. To upgrade overwrite hack .php files + uninstall product, then reinstall (your existing webtemplates will be intact)
20.Aug.2006 - > Version 3.6.00
* A bug fix that can cause a MYSQL warning in a few servers in WT admin cp. A minor and unusual problem that happens in certain servers and you don't need to upgrade if you don't see such a message. To upgrade overwrite /includes/wt_include.php and /admincp/wt_wt.php files.
1.Oct.2006 - > Version 3.6.01
* A minor bug fix for showing user avatar and ipaddress in webtemplates. To upgrade overwrite /includes/wt_include.php and view.php files.
2.May.2007 - > Version 3.6.02
* IMPORTANT SECURITY UPDATE! A security problem has been fixed in this version. To upgrade overwrite /includes/wt_include.php and view.php files which is attached to this post (https://vborg.vbsupport.ru/showthread.php?p=1240008#post1240008).
21.June.2008 - > Version 3.6.03
* Two minor bugs (1 (https://vborg.vbsupport.ru/showpost.php?p=1515039&postcount=855) & 2 (https://vborg.vbsupport.ru/showthread.php?p=1555226#post1555226)) fixed.
29.July.2008 - > Version 3.7.00
* A new version for vbulletin 3.7.x is released in a seperate thread here:
https://vborg.vbsupport.ru/showthread.php?t=186644 (https://vborg.vbsupport.ru/showthread.php?t=186644)
Logician
12-16-2005, 02:18 PM
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. You'll also find a "How to Create your First WebTemplate" document in the ZIP file.
3) Is installation/uninstallation easy?
Yes, can't be easier. Webtemplates is NOT an hack so you don't need to modify any vbulletin files to install webtemplates.
4) 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.
5) For what can I use this hack?
You can use it to create pages that needs to inherit your vb skin and permissions. For instance you can design pages like "About Us", "Donations" etc.
6) Can I use other portal/vbulletin integrated home page hacks (eg. vbadvanced) with webtemplates?
Yes you can. Webtemplates neither substite/replace any of them, nor touch them.
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.5.x? What about 3.6.x?
Yes, I would say. It is tested with 3.5.0, 3.5.1, 3.5.2, 3.5.3 and it will work new coming vb versions until 4.x shows up. It is also tested with 3.6.0 gold and they are compatible too.
For 3.0.x version or 2.x version see relevant threads.
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.
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 was using WebTemplates in 3.0.x board and I have custom WebTemplates. Can I keep them in version 3.5 ?
Yes. Read "Upgrade from version 3.0.x.txt" document in the ZIP file.
Logician
12-16-2005, 02:18 PM
Webtemplate Post-Installation FAQ:
1) I have installed the webtemplates but I guess it does not work ok?
Double check you've installed it correctly. Especially make sure you uploaded the files to the correct locations.
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.
However its PHP parsing capability is limited to vbulletin's PHP parsing capability due to its integration with vb. In other words if your PHP code does not work fine in vb phpinclude template, it wouldn't work fine as a webtemplate either.
3) Can I put view.php in a different directory?
No. 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.
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 export your webtemplates/webqueries as XML files. 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 webtemplate content be searched in Vbulletin search?
No.
11) Do Webtemplates have search engine friendly URLs?
Yes. However it is experimantal and works only in apache servers. See help document for more info.
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?
It is 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.
15) Can I use vb Phrases in WebTemplates?
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.
16) 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.
17) 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".
20) How can I uninstall it?
Select "uninstall" in Product Manager and it will automatically uninstall. Uninstalling does not remove database tables so that your custom webtemplates will not be lost when you reinstall. If you want to delete database records too run this query :
DROP TABLE `wt35_query`, `wt35_theme`, `wt35_visitlog`, `wt35_webtemplate`;
21) It is nice to see WebTemplate visits in Who is Online but I have a private WebTemplate which I want to hide from other WOL visitors. Can I do that?
Yes. Rename your webtemplate and make sure its name starts with affix priv_
22) After the installation, I get "Fatal error: Call to undefined function: key_exists()". Any fix for this?
Yes. See here: https://vborg.vbsupport.ru/showthread.php?p=853106#post853106
23) Editor interface of regular users can be improved in many ways to create other hacks around Webtemplates. What do you think?
Please read this : https://vborg.vbsupport.ru/showpost.php?p=880487&postcount=163
24) If I ban a certain usergroup from viewing a webtemplate, anybody who belongs to this usergroup in anyway is banned even if their primary usergroup is different. Can the permission system work differently?
Please read this : https://vborg.vbsupport.ru/showpost.php?p=886907&postcount=180
25) (vb 3.7.x) 25) When I try to export existing webtemplates and webqueries, I get Warning: Missing argument 1 for vb_xml_builder() in /includes/class_xml.php on line 465
Fatal error: vB_XML_Builder::Registry object is not an object in /includes/class_xml.php on line 473? Any fix for this?
Please read this : https://vborg.vbsupport.ru/showpost.php?p=1328647&postcount=743
26) (vb 3.7.x) 26) I was using the hack fine in 3.6 but after upgrading to 3.7, all webtemplates disappeared and webtemplate pages display just text "header". Any fix for this?
Yes, read here: https://vborg.vbsupport.ru/showpost.php?p=1515039&postcount=855
27) I have quoteit! hack and I get Parse error: syntax error, unexpected T_STRING in .... /forums/view.php(901) : eval()'d code on line 1 error in webtemplates.
Read here: https://vborg.vbsupport.ru/showthread.php?p=1576908#post1576908 (https://vborg.vbsupport.ru/showthread.php?p=1576908#post1576908)
Logician
12-16-2005, 02:19 PM
Differences Between 3.0.x Version and 3.5.x Version:
? Page Security Settings are now simpler. You don?t have to enter userids or usergroupids anymore. Instead you can directly enter disallowed usernames and check disallowed usergroups in a more friendly interface.
? Same simplicity applies to ?WebTemplate Editors? and ?Logged Usergroups/Usernames? Sections.
? ?Is Private? per Webtemplate option is removed as it was redundant. WebTemplates Hack has now ?is draft? option and banned usergroups/usernames options for your page security needs.
? Meta Keywords and Meta Description per WebTemplate is added for better search engine optimization.
? ?Download WebTemplate/Webquery as a text file? option is removed and replaced with ?Import / Export WebTemplates as a XML? file. This will help you to save your WebTemplates in a better supported format and hack users can very easily share eachothers WebTemplates by import feature.
? ?Logician Conditional Syntax? is no more supported in this version of the WebTemplates. Instead you can use vb3 conditional syntax for your conditional needs. That is:
<if condition = ?????..?>?????<else />?????.</if>
? User friendly URL support is added. So instead of calling your WebTemplates as:
http://www.yoururl.com/yourforum/view.php?pg=webtemplatename
You can now ALSO call it as:
http://www.yoururl.com/yourforum/view_webtemplatename.htm
Please note this feature is experimental, and not fully supported by me at this time. I tested it and it works for me but it may not work for you due to your server settings, webserver program, .htaccess settings etc.
? ?Outside variables? are removed from the hack as it is confusing for novice users and redundant for expert users. Someone who needs to pass outside variables to the webtemplate can use PHPINCLUDE field of webtemplate to clean and process variables in the vbulletin way. Eg.
$vbulletin->input->clean_array_gpc('r', array(
'my_variable_1' => TYPE_STR,
'my_variable_2' => TYPE_INT,
));
Logician
12-16-2005, 02:19 PM
A kudo Received Kudo:
Hey Logician,
I abolutely LOVE your webtemplates!
I wanted to show you a little test I did. I wanted to see if I could put together a little site with JUST using your web templates only. www.bklab.com
Maybe you can include this site in the hack description? There are about 25 templates running on that site
Thanks again
nexialys
12-16-2005, 02:23 PM
ok, i'm the first...
can i say i'm happy now, that it is really for 3.5.x ?!
that was the missing link for my taking control of the web.. lol
/me clicks THANKS!
chairman miaow
12-16-2005, 02:31 PM
Wow ! Impressive stuff........easy to install - cheers ! :banana:
-=Sniper=-
12-16-2005, 02:39 PM
wow this is amazing dude, something with similiar features but as an article manager would be a dream. hehe
great work
Stachel
12-16-2005, 02:44 PM
Thank you thank you thank you !!
kaniksu
12-16-2005, 02:54 PM
I've been waiting for this! Thank you!!!
jesse
12-16-2005, 03:00 PM
Damn the work into this I wouldnt mind donating Great work
Chris M
12-16-2005, 03:02 PM
Very nice, as always :)
Chris
Cyricx
12-16-2005, 03:21 PM
You never fail to amaze bro :)
michaelbenson
12-16-2005, 03:42 PM
Very impressive :)
AshokForums.com
12-16-2005, 04:01 PM
Awesome Awesome Awesome... Too good.. Thanks..
LincolnForums
12-16-2005, 04:19 PM
Doesnt seem to work with table prefix? :dunno: If i dont include any queries it seems to work just fine, but if i try to include some of the WebQueries that came with the install it doesnt work :(
Database error in vBulletin 3.5.0:
Invalid SQL:
SELECT username,userid, posts FROM user ORDER BY posts DESC LIMIT 10;
MySQL Error : Table 'fight_forums.user' doesn't exist
Error Number : 1146
Date : Friday, December 16th 2005 @ 01:18:13 PM
Script : http://www.fightrice.com/view.php?pg=aboutus
Referrer : http://www.fightrice.com/admincp/wt_wt.php
IP Address : xxxxxxxx
Username : Dave
Classname : vb_database
lazyseller
12-16-2005, 05:00 PM
Very nice even has meta tag / keyword support
DJ XtAzY
12-16-2005, 05:56 PM
so u can say this hack is an alternative to vbadvanced CMPS? i mite use this instead =]
Antivirus
12-16-2005, 06:05 PM
sweet- gonna chech this out this weekend!
FleaBag
12-16-2005, 06:08 PM
Yeah it's great to have this one back Logician. Thanks for sharing!
Logician
12-16-2005, 06:20 PM
Doesnt seem to work with table prefix? :dunno: If i dont include any queries it seems to work just fine, but if i try to include some of the WebQueries that came with the install it doesnt work :(
I've fixed this. Please redownload the new package and overwrite the files.
lazyseller
12-16-2005, 06:27 PM
Sorry im a newbie but i do have a simple question
With the webqueries option say i wanted to create a mod that selects a random user for a raffle. I would just have to query the database and select a random user than put it in the webtemplates and im all done is this correct ?
Logician
12-16-2005, 06:29 PM
Sorry im a newbie but i do have a simple question
With the webqueries option say i wanted to create a mod that selects a random user for a raffle. I would just have to query the database and select a random user than put it in the webtemplates and im all done is this correct ?
You can create a Webquery that pulls a random username/userid (with mysql's rand() function) and post it into a webtemplate but if you do that this webtemplate will show a different username everytime it is loaded. I'm not sure if this is what you like to do.
harpez
12-16-2005, 06:33 PM
Great, this is just what i've been looking for!
dieselpowered
12-16-2005, 06:49 PM
This looks incredible...will look at when I get home!!
harpez
12-16-2005, 06:55 PM
Ok... I just get a page with my html in it! I don't get it integreated into the vb style!
EDIT: What I mean is, what I get displayed is what I should see, but it just isn't integrated into the template!
croportal
12-16-2005, 07:11 PM
GREAT WORK, just great
emtee
12-16-2005, 07:50 PM
Oh man I've been waiting for this! Thanks a lot Logician!!! :banana:
Logician
12-16-2005, 08:05 PM
Ok... I just get a page with my html in it! I don't get it integreated into the vb style!
EDIT: What I mean is, what I get displayed is what I should see, but it just isn't integrated into the template!
Select a theme for your webtemplate.
And reading help document and "How to Create your First WebTemplate" document will also help greatly.
ReadOrDie
12-16-2005, 08:12 PM
I don't know any html but this would be very useful. Does it come with already made templates?
Logician
12-16-2005, 08:18 PM
I don't know any html but this would be very useful. Does it come with already made templates?
Yes.
Bubble #5
12-16-2005, 09:30 PM
Congratulations Logician on what appears to be another wonderful hack from you :)
We will be installing it next week and look forward to learning how to use it. As a suggestion for future versions, perhaps instead of the message shown in the thumbnail below, you could have a link that pops up with all the variables listed, similar to what is done for smilies and attachments :)
Great hack Logician. You're an inspiration to many other coders :nervous:
cheech4487
12-16-2005, 10:53 PM
Great work thank you very much!!! The install went very easy.
LincolnForums
12-16-2005, 10:56 PM
I always hate to be the one to point out problems but i dunno if this is on my end or not, but in the Whos Online, when someone is viewing a page and it comes up as a link it doesnt take me where it is suppose to go..example
Reading SITE PAGE:
Holy Cow (#)
Which would be something like this, http://www.forum.com/view.php?pg=cow
But IN the Whos Online Template it ends up like
Reading SITE PAGE:
Holy Cow
and the link is http://www.forum.com/?ph=cow
*I havent downloaded the updated package yet, so i dunno if this is fixed in that or not.
Thanks for the hack btw
sitka
12-17-2005, 02:11 AM
Can this be used with vbseo?
klaush
12-17-2005, 04:49 AM
Thanks!
Great!
Logician
12-17-2005, 07:23 AM
I always hate to be the one to point out problems but i dunno if this is on my end or not, but in the Whos Online, when someone is viewing a page and it comes up as a link it doesnt take me where it is suppose to go..example
I've fixed that too. Please apply latest version from the first post.
Logician
12-17-2005, 07:25 AM
Can this be used with vbseo?
I have no idea. vbseo is an encrypted code so it is impossible for us to see what it is doing in the background or if it is clashing with a hack or not. If you want an educated guess, I'd say it would work unless you enable webtemplate's seo friendly urls. Give it a try and let us know too.
Spinball
12-17-2005, 08:01 AM
Thanks very much! Imported all of our old templates ok. One curious thing.
The Display Page Browsers? setting isn't being remembered.
I'm selecting 'No' and saving but when I re-edit, it comes back 'Yes'.
Also the version number in the product manager reads 3.5.0.0 after installing version 3.5.0.3
Logician
12-17-2005, 08:26 AM
Thanks very much! Imported all of our old templates ok. One curious thing.
The Display Page Browsers? setting isn't being remembered.
I'm selecting 'No' and saving but when I re-edit, it comes back 'Yes'.
This is also fixed now. New version attached to the first post.
Neutral Singh
12-17-2005, 01:40 PM
Oh!! Thanks for a pre-Chrismas Gift!! I love you man... errr!! your work i should say. ;)
THANKS
drdaco
12-17-2005, 02:12 PM
I LOVE IT! thank you soooo much
SCRIPT3R
12-17-2005, 04:09 PM
will install after the holidays - thank you!
Wachtmeister
12-17-2005, 07:31 PM
Hello,
is it possible to do the following with this script (and how)?
http://www.mypage.de/forum/view.php?pg=aboutus
I want to show location and reputation of some users. Is this possible with any variable?
//edit: to say it clear: i don't want to use the included variables. i want to show those infos not for the current logged in (viewing) user. I want it for the user with userid=1 and for the user with userid=5 and so on.
Synth
12-18-2005, 02:31 AM
I have been waiting for something like this!! Thanks so much for the Christmas gift!!
*INSTALLS*
Hello,
How does this application handle the templates? I have installed this, but an error shows up after viewing a page a few times that says:
"Redirection limit for this URL exceeded. Unable to load the requested page. This may be caused by cookies that are blocked."
The only URL this happens with are those with the extension "view.php?pg=pagename and only with the page listed as using the "TEXT Parse Method". (So far anyways. HTML pages haven't displayed this error yet.)
I don't have a redirection limit that I am aware of and it isn't a cookie issue. I have my site on a VPS and the only limits I have are on bandwidth and disk space (both I have plenty of).
My members are also getting this error, but they can all access the HTML page I created that links to the "caresheets". (I run reptile husbandry sites.)
For the time being I am going to toss the caresheets in a forum so my members can use them. I like how this deals with the permission system, so it would be great if I knew what was causing this. Thanks.
Logician
12-18-2005, 03:53 PM
Hello,
How does this application handle the templates? I have installed this, but an error shows up after viewing a page a few times that says:
"Redirection limit for this URL exceeded. Unable to load the requested page. This may be caused by cookies that are blocked."
The only URL this happens with are those with the extension "view.php?pg=pagename and only with the page listed as using the "TEXT Parse Method". (So far anyways. HTML pages haven't displayed this error yet.)
I don't have a redirection limit that I am aware of and it isn't a cookie issue. I have my site on a VPS and the only limits I have are on bandwidth and disk space (both I have plenty of).
My members are also getting this error, but they can all access the HTML page I created that links to the "caresheets". (I run reptile husbandry sites.)
For the time being I am going to toss the caresheets in a forum so my members can use them. I like how this deals with the permission system, so it would be great if I knew what was causing this. Thanks.
I dont think it is related to the hack. I suspect it is related to the server settings and especially active ".htaccess" files you have in the server. It sounds like server is causing an infinitive loop to this file for a reason hence this error message happens. I'd suggest you to check your .htaccess files and even temporarily remove/disable them to see if it helps. If this does not help and you want me to trace it more, give me FTP and vb admin cp access and I can try to check if I find a spare time.
Edit : If you turned on hack's SEO friendly URLs, try turning it off and also remove its .htaccess files and see if it helps. It can be it that is clashing with smt. in your server.
PiotrasG
12-18-2005, 04:11 PM
hell yea nice hack installing.... Thx
b6gm6n
12-18-2005, 07:21 PM
Hi, this add-on looks perfect for my needs thankyou, i'll be trying something with it later which i may need some advise on later, basically trying to include another php script which generates an topsite page...heres hopeing, i think i know how i can achieve this...:) thanx again
=-b6
tuanluu
12-19-2005, 07:20 AM
i will install when I upgrade my board
Pretty nice! Thanks!
One immediate problem though: When selecting PHP as parse method and Default Basic Theme as theme, it doesn't print the template, only prints the output of what's in the field.
Martin
hugh_
12-20-2005, 05:49 AM
Can search engines index webtemplates without the SEO hack enabled?
Thanks...
hugh
Logician
12-20-2005, 06:39 AM
Can search engines index webtemplates without the SEO hack enabled?
Yes. Here is a demonstration : http://www.google.com/search?as_q=%26+powered+Logician+WebTemplates&num=30&hl=en&btnG=Google+Search&as_epq=&as_oq=&as_eq=&lr=&as_ft=i&as_filetype=&as_qdr=all&as_occt=any&as_dt=i&as_sitesearch=&as_rights=&safe=off
It is just that if you use SEO friendly URLs your page may rank higher.
One immediate problem though: When selecting PHP as parse method and Default Basic Theme as theme, it doesn't print the template, only prints the output of what's in the field.
In PHP parsing, themes are off.
Huijting
12-20-2005, 08:01 AM
I like the work U did but it doesn't work @ my site, getting the next error testing the test pages:
Fatal error: Call to undefined function: key_exists() in /home/httpd/vhosts/huijting.nl/httpdocs/vbul/view.php on line 568
I'm afraid it has to do with my php version :-( , can U please help me :-)
Rob
hugh_
12-20-2005, 08:04 AM
Yes. Here is a demonstration : http://www.google.com/search?as_q=%26+powered+Logician+WebTemplates&num=30&hl=en&btnG=Google+Search&as_epq=&as_oq=&as_eq=&lr=&as_ft=i&as_filetype=&as_qdr=all&as_occt=any&as_dt=i&as_sitesearch=&as_rights=&safe=off
It is just that if you use SEO friendly URLs your page may rank higher.
In PHP parsing, themes are off.
I thought as much but it's good to have it confirmed! Great thanks for giving me the means to bridge some structural gaps that have been with my site for many years...
hugh
ChrisBaktis
12-20-2005, 11:52 AM
This is a Fantastic Hack!
One thing that I would like to see is expandable catagories for the custom pages...for example - we do extensive product reviews, and we do many of them each month, it would be great to have a catagory that we can click on that will expand those pages so they are not all cluttered on the main page.
Logician
12-20-2005, 01:37 PM
I like the work U did but it doesn't work @ my site, getting the next error testing the test pages:
Fatal error: Call to undefined function: key_exists() in /home/httpd/vhosts/huijting.nl/httpdocs/vbul/view.php on line 568
Edit view.php and replace all "key_exists" term with "array_key_exists" and that should fix it.
key_exists is a function that exists in old PHP versions and array_key_exists is a function that exists in the recent PHP versions. I used to use array_key_exists in the previous releases of this hack but it caused problems with servers that has old PHP versions so in this release, I changed it with key_exists. Now we have problems with new PHP versions. :)
Installed but nothing showing in admincp .. double checked all file additions ?
In PHP parsing, themes are off.
Why's that? Would you mind making it optional?
Martin
Logician
12-20-2005, 01:51 PM
Installed but nothing showing in admincp .. double checked all file additions ?
1- Make sure "cpnav_webtemplates.xml" is uploaded to /includes/xml/
2- Log out from admin cp, log in back.
1- Make sure "cpnav_webtemplates.xml" is uploaded to /includes/xml/
2- Log out from admin cp, log in back.
Still not showing :ermm:
Logician
12-20-2005, 03:02 PM
Still not showing :ermm:
Can you see the hack options in your vb options or access admincp pages via url like: www.yourforum.com/admincp/wt_wt.php
hugh_
12-20-2005, 08:03 PM
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.
Using this means of calling the templates I get an error messages saying the page hasn't loaded correctly, the style choser doesn't work and netheir does the log-in prompt. Am I doing something wrong?
Thanks...
hugh
Can you see the hack options in your vb options or access admincp pages via url like: www.yourforum.com/admincp/wt_wt.php
Yes to both ! :nervous:
Logician
12-21-2005, 06:17 AM
Yes to both ! :nervous:
It really sounds like you have a problem with the upload of "cpnav_webtemplates.xml" file. Try to delete it and then reupload. Make sure you upload as ASCII file, not "bin".
Ramsesx
12-21-2005, 08:34 AM
Thanks for this quick installing hack and the very nice explanation.
One question, the .htacces file is necessery? Because having already one from vbseo inside the root folder.
Thanks
Logician
12-21-2005, 08:42 AM
Thanks for this quick installing hack and the very nice explanation.
One question, the .htacces file is necessery? Because having already one from vbseo inside the root folder.
Thanks
Nope it is not. It is needed only if you want to use seo friendly webtemplate urls. You can find more info in the manual.
Masiello
12-21-2005, 03:45 PM
Thanks veru much, i click install, great work really!
It more be also beautifull if somehow it created a menu link and sublink in a module in case of need, it would really the best one of the elite code!
Logician
12-21-2005, 07:09 PM
Thanks veru much, i click install, great work really!
It more be also beautifull if somehow it created a menu link and sublink in a module in case of need, it would really the best one of the elite code!
I'm not sure what you mean but if you wanted an automated list of your webtemplates, sample webtemplate named "wtlist" does it.
Masiello
12-21-2005, 07:13 PM
I inteed a real column menu on the forum of all created pages
Bubble #5
12-22-2005, 11:00 PM
For the htaccess file, shouldn't:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^view_(.*).htm$ view.php?pg=$1
Be written as:
RewriteCond %{REQUEST_FILENAME} !-f [L]
RewriteRule ^view_(.*).htm$ view.php?pg=$1 [L]
Just wondering :ermm:
Logician
12-23-2005, 05:22 AM
For the htaccess file, shouldn't:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^view_(.*).htm$ view.php?pg=$1
Be written as:
RewriteCond %{REQUEST_FILENAME} !-f [L]
RewriteRule ^view_(.*).htm$ view.php?pg=$1 [L]
Just wondering :ermm:
Unless you have a already complicated .htaccess, I don't think L flag is necessary but if you have other rewrite rules in your .htaccess, yes you can add it as you pointed out.
Masiello
12-23-2005, 06:26 AM
For me working fine only on that mode
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^view_(.*).htm$ view.php?pg=$1
fn9mm
12-25-2005, 07:57 AM
nice hack, Logician,...
one question though : as suggested in the manual , I would like to add some categories in my webtemplates, but i can't find this file as stated in the manual
$WT_Option_Categories[] ='Your Custom Pages';
in file wt_options.php.
is there an other solution
Logician
12-25-2005, 08:31 AM
nice hack, Logician,...
one question though : as suggested in the manual , I would like to add some categories in my webtemplates, but i can't find this file as stated in the manual is there an other solution
Haven't you uploaded this file to /forum/includes/ folder?
fn9mm
12-25-2005, 10:50 AM
the file wt_options.php is not included in the download package, in the includes folder, i can only find this file : wt_include.php
ok solved
i found the '$WT_Option_Categories[] = 'Your Custom Pages';' option in the wt_include.php file,
plz change the filename in the manual from wt_option.php to wt_include.php
fn9mm
12-25-2005, 11:01 AM
i found the right file, but adding categories in this file doesn't seem to work
i added my categories like this
$WT_Option_Categories[] = 'Default WebTemplates'; // <-- Do NOT touch this!!
$WT_Option_Categories[] = 'Your Custom Pages'; //
$WT_Option_Categories[] = 'Usenet'; //
$WT_Option_Categories[] = 'Virtuele schijven-images'; //
$WT_Option_Categories[] = 'Software'; //
$WT_Option_Categories[] = 'Diverse'; //
this should work,...
Logician
12-25-2005, 04:44 PM
i found the right file, but adding categories in this file doesn't seem to work
i added my categories like this
$WT_Option_Categories[] = 'Default WebTemplates'; // <-- Do NOT touch this!!
$WT_Option_Categories[] = 'Your Custom Pages'; //
$WT_Option_Categories[] = 'Usenet'; //
$WT_Option_Categories[] = 'Virtuele schijven-images'; //
$WT_Option_Categories[] = 'Software'; //
$WT_Option_Categories[] = 'Diverse'; //
this should work,...
You did it correctly. You should be seeing your categories when you add a new template or in edit webtemplate page. When you have at least one webtemplate in a category, it will be visible in your list too.
fn9mm
12-26-2005, 08:42 AM
You're absolutely right !!
Thx for the help,...
Masiello
12-26-2005, 08:46 AM
Anyone have my same issue? After installing webtemplate the users who using FireFox dont showing check bot for Terms aggrement in registration page (register.php)
Masiello
12-26-2005, 12:50 PM
I have solved my issue, the problem is the language file not compatible, Thanks and sorry for my disturb
Installed but nothing showing in admincp .. double checked all file additions ?
Found the problem .. disabling ACP display order (https://vborg.vbsupport.ru/showthread.php?t=101387) and list now shows in admincp.
Might prove useful for anyone else that has the same problem.
dc1pop
12-27-2005, 01:10 PM
edit
JohnBee
12-28-2005, 02:04 AM
Awesome! - I will try this out on my forum ASAP.
Kihon Kata
12-28-2005, 03:13 AM
Fricken over the top Logician! Installed! Now I have to figure out how to use it.
yessir
12-28-2005, 05:47 PM
Anyone got a vBAdvanced CMPS module for webtemplates yet?
Masiello
12-28-2005, 05:52 PM
I'm looking around for that too.
badham
12-29-2005, 02:31 AM
This is a great hack, works like a charm
badham
bulbasnore
01-01-2006, 08:09 PM
Well, as Shirley Temple would say*:
OH MY GOODNESS!
I followed the install instructions, then the upgrade. Got a little out of phase because of uploading the files in the wrong spot. Then with fear and trepidation I imported my old templates which make heavy use of external variables.
BOINK!
It just works. Oh wait, looks like I have some work to do on my external variables. Oh well!
Hooray for Logician and happy new year!
*Sorry, I'm an old guy. Watch one of her movies!
bulbasnore
01-01-2006, 08:48 PM
Alrighty, here's my problem.
In the old templates I had this in the Outside Variables box of the target template:
formSetNo
Another template POSTS that variable and an integer value to the target via selection from a popup menu.
Following this sample code:
$vbulletin->input->clean_array_gpc('r', array(
'my_variable_1' => TYPE_STR,
'my_variable_2' => TYPE_INT,
));
I have the following in the 3.5 target template:
$vbulletin->input->clean_array_gpc('r', array(
'formSetNo' => TYPE_INT
));
I've also tried it with TYPE_STR.
Anyway, the target template isn't getting the variable. Any suggestions? This is for a major feature of our site!
bulbasnore
01-01-2006, 09:15 PM
And here's the fix:
vBulletin wisely forces you to clean inputs. This is explained here:
http://www.vbulletin.com/docs/html/codestandards_gpc :glasses:
For your Webtemplate PHP include, you can collect and clean variables (using an array) or a single variable (using key/value hash pair). I used the latter.
So, my one webtemplate POSTs a variable from a form field called 'formSetNo'.
In the target webtemplate, my php include is:
$vbulletin->input->clean_gpc('p', 'formSetNo', TYPE_INT);
The 'p' indicates to the clean_gpc function to look at the POSTed variable. See the documentation link for dealing with other types of input like GETs and COOKIEs.
To use the value in that variable in my php script in my target webtemplate, I use something like this:
$colname__Recordset2 = $vbulletin->GPC['formSetNo'];
Now $colname_Recordset2, which I use to do work elsewhere in my php code, has the value from the POSTed variable! Yay!
Nice to see that vB has a way to do this and it works with WT :banana:
da prez
01-02-2006, 08:10 PM
sheer genius.
thanks logician.
now i just gotta learn how to write queries. :D
b6gm6n
01-04-2006, 01:50 AM
I wondered if adding my default style header, navbar & footer wouldnt be more easier... i've read the docs and assumed i could either add my default vb header using : $header either in a 'theme' where it's called into my pages (with styling) or as pages parsed as php, but i does not... whats the trick? i've tried : Included VB Templates...nope, tried a simple theme, no go, also added as php...so frustrating, please help
-b6
Kihon Kata
01-04-2006, 02:09 AM
I wondered if adding my default style header, navbar & footer wouldnt be more easier... i've read the docs and assumed i could either add my default vb header using : $header either in a 'theme' where it's called into my pages (with styling) or as pages parsed as php, but i does not... whats the trick? i've tried : Included VB Templates...nope, tried a simple theme, no go, also added as php...so frustrating, please help
-b6
Same thing for me b6. I have a whole section programmed OUTSIDE my forums(w/ db connectivity) and I did the same thing and nothing. :(
RaceJunkie
01-04-2006, 02:33 AM
How do i make this text smaller?
WebTemplate Quick Info Panel for Admins - [CMS by Logician]
Logician
01-04-2006, 07:20 AM
I wondered if adding my default style header, navbar & footer wouldnt be more easier... i've read the docs and assumed i could either add my default vb header using : $header either in a 'theme' where it's called into my pages (with styling) or as pages parsed as php, but i does not... whats the trick? i've tried : Included VB Templates...nope, tried a simple theme, no go, also added as php...so frustrating, please help
I'm not sure if I can follow you on this?
Please check the default themes that comes with the installation. For instance check "Default Basic Theme" theme. It already has "$header" variable in it, and it is displaying your default style header, isn't it? So if you create a theme of your own and put $header in it in the same way "Default Basic Theme" has, it will display your header. It should include all relevant variables like this:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>Your page title</title>
$headinclude
</head>
<body>
$header
$navbar
<page content goes here>
<and dont forget footer too>
On the other hand things are more complicated in PHP parsed webtemplates. If you want to paste content of your header in a PHP parsed webtemplate do it with PHP commands. Eg.
echo $header;
How do i make this text smaller? WebTemplate Quick Info Panel for Admins - [CMS by Logician]
It is inside template named "WebTemplates_AdminPanel"
b6gm6n
01-06-2006, 01:05 AM
Default Basic Theme? whos got one of those then?
right... my default install came with nothing, i created a simple bbcode page as the instructions told me and it worked, no styling of anykind just text on a white background, great, ...i see i have "No Header/Footer WebTemplates Exist at the moment.." and "No Themes Exist at the moment.."... i did create a theme but still nothing, so...whats the code for this "Default Basic Theme"? and what to call it when im setting it up etc etc, i did hope to see my header, nav and footer with my text also...im i being pushy? :)
-b6
yessir
01-06-2006, 04:05 AM
Default Basic Theme? whos got one of those then?
right... my default install came with nothing, i created a simple bbcode page as the instructions told me and it worked, no styling of anykind just text on a white background, great, ...i see i have "No Header/Footer WebTemplates Exist at the moment.." and "No Themes Exist at the moment.."... i did create a theme but still nothing, so...whats the code for this "Default Basic Theme"? and what to call it when im setting it up etc etc, i did hope to see my header, nav and footer with my text also...im i being pushy? :)
From the install doc.
STEP 3- Close your browser, reopen it, relogin to your admin cp and you should to see "Logician's WebTemplates" in the left menu. Expand it and click "Export/Import", then "Upload Webtemplate .XML File", point the file named "webtemplate_export.xml".
(There are 2 XML files, please make sure you import the file named "webtemplate_export.xml")
(This step is to upload default webtemplates and webqueries to your webtemplate system)
Logician
01-06-2006, 07:12 AM
Default Basic Theme? whos got one of those then?
Exactly as roscoe36 said.
You forgot to install default webtemplates and webqueries in installation step 3
b6gm6n
01-06-2006, 12:55 PM
DOH!, i miss read, sorry guys, all working!
-b6
adwolf1
01-10-2006, 10:16 PM
hi, great plugin!
quick question about simple form handling ..
Setting it in php rendering mode, i tried to create a template with a simple web form. I wanted to pass the form to another php page for further processing.
The submitted form variables aren't making it to the target page (ie, echo $_POST['myvariable']; shows nothing. Is there anything special I have to do to get the variables to show up?
Thanks for the help!
Gayble
01-12-2006, 08:48 AM
EXACTLY what I was after! :) I love you! :)
Thanks for making this hack.
EXACTLY what I was after! :) I love you! :)
Thanks for making this hack.
First off, thank you for an awesome hack.
Next up: I would really like to change the default behavior of my webtemplates to be hidden from all usergroups, so that I will have to manually check the boxes for groups that are allowed to view the page rather than selecting which groups are not allowed.
Would this be a difficult thing to accomplish? I have almost 300 secondary usergroups and most of my pages should only be visible to 5-10 roups... That is a whole lot of boxes to check for each page...
After playing around with this last night, I dicovered that I am unable to restrcit more than 50 or so groups from viewing any given page. I am guessing that maybe not enough space for an array was allocated somewhere or something?
Any ideas where i could expand this to allow for more usergroups to be processed?
I found the function in the includes file that processes usergroup permissions, is there anywhere else that I would need to change to switch the default into an opt-in system rather than an opt-out? (will be testing later today to try and answer this on my own)
Logician
01-15-2006, 07:53 AM
Setting it in php rendering mode, i tried to create a template with a simple web form. I wanted to pass the form to another php page for further processing.
This post should help:
https://vborg.vbsupport.ru/showpost.php?p=862083&postcount=93
You should clean your POST variable in phpinclude field of webtemplate:
$vbulletin->input->clean_gpc('p', 'formSetNo', TYPE_INT);
$formSetNo = $vbulletin->GPC['formSetNo'];
Next up: I would really like to change the default behavior of my webtemplates to be hidden from all usergroups, so that I will have to manually check the boxes for groups that are allowed to view the page rather than selecting which groups are not allowed.
Would this be a difficult thing to accomplish? I have almost 300 secondary usergroups and most of my pages should only be visible to 5-10 roups... That is a whole lot of boxes to check for each page...
Edit wt_wt.php, find:
print_membergroup_row("Disallowed Usergroups <br><font size='1'>Mark usergroups who can <b>NOT</b> display this page</font>", 'webtemplate[banusergroupids]', 2, "");
replace it as:
$usergroups = $vbulletin->db->query_read("SELECT usergroupid,title FROM " . TABLE_PREFIX . "usergroup ORDER BY title");
while ($usergroup = $vbulletin->db->fetch_array($usergroups))
{
$usergrps_with_space .= $usergroup[usergroupid]." ";
}
$webtemplatebanusergroups[membergroupids] = convert_WTfield_to_usergroup_array($usergrps_with_ space);
print_membergroup_row("Disallowed Usergroups <br><font size='1'>Mark usergroups who can <b>NOT</b> display this page</font>", 'webtemplate[banusergroupids]', 2, $webtemplatebanusergroups);
After playing around with this last night, I dicovered that I am unable to restrcit more than 50 or so groups from viewing any given page. I am guessing that maybe not enough space for an array was allocated somewhere or something?
Any ideas where i could expand this to allow for more usergroups to be processed?
Run this query and see if it will help:
ALTER TABLE `wt35_webtemplate` CHANGE `banusergroups` `banusergroups` MEDIUMTEXT NOT NULL ,
CHANGE `logvisitors` `logvisitors` MEDIUMTEXT NOT NULL ,
CHANGE `editors` `editors` MEDIUMTEXT NOT NULL
Kurisu
01-15-2006, 12:19 PM
Awesome hack!
But I get an error directly after installing... (see screenshot)
Logician
01-15-2006, 02:59 PM
Awesome hack!
But I get an error directly after installing... (see screenshot)
Apparently the installation didn't go well for a reason. Uninstall the hack, login to phpmyadmin and manually delete webtemplate tables:
DROP TABLE `wt35_query`, `wt35_theme`, `wt35_visitlog`, `wt35_webtemplate`;
Then reinstall it again (carefully!). If you still have the problem after second install and don't mind me giving admin cp, ftp and phpmyadmin access, I can check for you. Otherwise, I am not sure what goes wrong for you.
Kurisu
01-15-2006, 03:35 PM
Apparently the installation didn't go well for a reason. Uninstall the hack, login to phpmyadmin and manually delete webtemplate tables:
DROP TABLE `wt35_query`, `wt35_theme`, `wt35_visitlog`, `wt35_webtemplate`;
Then reinstall it again (carefully!). If you still have the problem after second install and don't mind me giving admin cp, ftp and phpmyadmin access, I can check for you. Otherwise, I am not sure what goes wrong for you.
Didn't work either... Same error.
Could it have something to do with my PHP version (5.0.5)? I read that PHP 5 handles arrays different...
Logician
01-15-2006, 04:00 PM
Didn't work either... Same error.
Could it have something to do with my PHP version (5.0.5)? I read that PHP 5 handles arrays different...
Yes sounds very possible.. I never tested it with PHP 5.x..
apleschu
01-16-2006, 04:43 PM
Seriously I was desperate after discovering that 3.5 doesn;t seem to have a portal system available (yet)
But even so, I like the concept of webtemplates MUCH better.
THANKS
Excellent mod and support Logician, Thanks
I missed this somehow when released. I just saw it listed in the H/O/M poll .. Hmm, I think I'm gonna run back over there and vote :D
tidy_boy
01-17-2006, 01:46 PM
Hey guys can anyone post a link to pages they have made with this hack so i can see the power of it :D
Thanks
RaceJunkie
01-17-2006, 03:21 PM
Hey guys can anyone post a link to pages they have made with this hack so i can see the power of it :D
Thanks
Here you go
here (http://www.localracechat.com/forums/view.php?pg=advertise)
tidy_boy
01-17-2006, 03:56 PM
Nice anyone else got any other examples then can show me :D
Edit wt_wt.php, find:
print_membergroup_row("Disallowed Usergroups <br><font size='1'>Mark usergroups who can <b>NOT</b> display this page</font>", 'webtemplate[banusergroupids]', 2, "");
replace it as:
$usergroups = $vbulletin->db->query_read("SELECT usergroupid,title FROM " . TABLE_PREFIX . "usergroup ORDER BY title");
while ($usergroup = $vbulletin->db->fetch_array($usergroups))
{
$usergrps_with_space .= $usergroup[usergroupid]." ";
}
$webtemplatebanusergroups[membergroupids] = convert_WTfield_to_usergroup_array($usergrps_with_ space);
print_membergroup_row("Disallowed Usergroups <br><font size='1'>Mark usergroups who can <b>NOT</b> display this page</font>", 'webtemplate[banusergroupids]', 2, $webtemplatebanusergroups);
Run this query and see if it will help:
ALTER TABLE `wt35_webtemplate` CHANGE `banusergroups` `banusergroups` MEDIUMTEXT NOT NULL ,
CHANGE `logvisitors` `logvisitors` MEDIUMTEXT NOT NULL ,
CHANGE `editors` `editors` MEDIUMTEXT NOT NULL
Logician,
Thanks for the quick reply and the fix. It worked as far as it was designed, but unfortunately my original request was flawed.
I have 12 "Primary" usergroups. All members belong to at least one of these groups. I also have a couple hundred "Secondary" usergroups, most members belong to several of these each. Using the "Opt-out" paradigm you have here, it is impossible for me to allow access to secondary usergroups without also granting access to entire primary usergroups
Example: If a user is a member of primary group 1 and secondary group A, If I try and block access to Primary Group 1 and allow access to Secondary Group A then the user will still not be allowed access because the way you have it written all users that are in primary group 1 are denied access.
So I re-wrote your permissions function in your include file to switch the whole system to an "Opt-in" paradigm so that it better matches how vbulletin usually treats permissions. Can you take a look at this and let me know if it looks ok? I have tested it out and it seems to work fine. The only thing I needed to disable was the "Restrict individual users" function that you had, other wise granting access to a user with userid = 20 also grants access to the usergroup with usergroupid = 20.
function WT_UsergroupPermission($userinfo, $return10 = 1, $usergroupname = '')
{
global $WT;
$permitted = 0;
$WT['banusergroups'] = trim($WT['banusergroups']);
if ($WT['banusergroups'])
{
$WT_banusergroups = explode(" ", $WT['banusergroups']);
if (WTis_member_of($userinfo, $WT_banusergroups))
{
$permitted = 1;
}
else
{
$permitted = 0;
}
/* if ($userinfo[userid] > 0 AND in_array('('.$userinfo[userid].')', $WT_banusergroups))
{
$permitted = 0;
} */
}
if ($WT['draft'] == 1 AND !WTis_member_of($userinfo, array("6"))) //draft webtemplate
{
$permitted = 0;
}
if ($return10) //return 1 or 0
{
return $permitted;
}
else //return usergroup name with color (permitten green, banned red)
{
if ($permitted)
{
return '<font color="#006600">'.$usergroupname.'</font>';
}
else
{
return '<font color="#C40000">'.$usergroupname.'</font>';
}
}
}
Logician
01-17-2006, 07:41 PM
The only thing I needed to disable was the "Restrict individual users" function that you had, other wise granting access to a user with userid = 20 also grants access to the usergroup with usergroupid = 20.
I really don't think so. Individual user info is kept between paranthesis () and checked this way too. So if you grant access to userid 20, the DB record is (20) but if you grant access to usergroupid, the record is just 20.
The section you commented out checks for paranthesis too so I wouldn't think it is allowing usergroupid 20 when you allowed userid 20.
Example: If a user is a member of primary group 1 and secondary group A, If I try and block access to Primary Group 1 and allow access to Secondary Group A then the user will still not be allowed access because the way you have it written all users that are in primary group 1 are denied access.
I see what you are saying but this algorithm matches with its logic. Because this section of the hack is for marking "banned" usergroups so when you mark a usergroup, this means the hack shouldn't give access to any user who is part of this group. If the hack would give access due to that users belonging to another usergroup, it would be impossible to ban primary usergroups as their users might get access due to secondary usergroups which they join themselves.
I'm sure you'll agree that most of the admin's permission system would depend on "primary usergroups", not "secondary usergroups" so IMO how it is designed is make sense. :)
I never meant to imply that it worked any way other than what you intended. It is an exceptionally well-written hack. For my own purposes though, I need it to work a different way, I just wanted to have you look over what I did above for a sanity check.
Thanks for clarifying the issue with the ()'s and the individually specified users, it makes much more sense that what I had assumed was going on.
If the hack would give access due to that users belonging to another usergroup, it would be impossible to ban primary usergroups as their users might get access due to secondary usergroups which they join themselves.
This is why vbulletin lets you designate a primary usergroup to not allow inherited permissions from any secondary groups for its in-built group permissions.
Again, this is an incredible hack, many thanks for sharing!
Bluestrike2
01-18-2006, 01:38 AM
I hate to be a bother, but I'm in need of some help. I searched through the support document, and I've skimmed most of this thread. I'm sorry if this has been asked before.
BUT - I was wondering how could I use the two column theme, but have the content of the one column user-editable while keeping it "moron proof." Actually, if there was a way for them to enter the number (its for scrim record) in a text box, that would be grande (and then another text box to enter the teams they scrimmed).
Also, is it possible to add another user editable field (editor I mean) that would show up another main table (for lack of a better word). If you need clarification, I'll post it. Thank you so much!
Guest210212002
01-18-2006, 02:15 AM
Please do post some clarification - I use WT a TON, and I have no idea what you're asking. :D
Bluestrike2
01-18-2006, 04:45 AM
Please do post some clarification - I use WT a TON, and I have no idea what you're asking. :D
Need. More. Caffeine. :D
You have the two column template. There are two tables with the stock one. As far as I can tell the only editable one (by the users who are able to edit them but don't have access to the admin CP) is the one on the right (herein referred to as the main table).
On the left column (the smaller column) you have the secondary tables.
My question - is it possible to add more "secondary tables" which are editable by the people who are allowed to with the HTML template editor (the basic one) and multiple boxes (one for each "table").
Does that make sense? What does is the fact that I need sleep :D.
Logician
01-18-2006, 07:49 AM
You have the two column template. There are two tables with the stock one. As far as I can tell the only editable one (by the users who are able to edit them but don't have access to the admin CP) is the one on the right (herein referred to as the main table).
On the left column (the smaller column) you have the secondary tables.
My question - is it possible to add more "secondary tables" which are editable by the people who are allowed to with the HTML template editor (the basic one) and multiple boxes (one for each "table").
I don't think so.
The crucial point is that you can make any part of a theme editable. So if you want to a section in the left column be editable, then you can edit your theme and put $includedtemplate variable to that section instead of into the right column.
However this variable is unique per theme so you have to put it into one section only. In other words you can NOT make it so that one section in the right and another section in the left is editable at the same time in editor interface.
Hope this sheds a light
Guest210212002
01-18-2006, 03:44 PM
I just wanted to chime in and say thanks for this addon Logician, my site wouldn't be the same without it. :)
Bluestrike2
01-19-2006, 09:25 AM
I don't think so.
The crucial point is that you can make any part of a theme editable. So if you want to a section in the left column be editable, then you can edit your theme and put $includedtemplate variable to that section instead of into the right column.
However this variable is unique per theme so you have to put it into one section only. In other words you can NOT make it so that one section in the right and another section in the left is editable at the same time in editor interface.
Hope this sheds a light
Ok - thanks for your help!
Kihon Kata
01-19-2006, 12:55 PM
I have a question. Is there a way to make the headers/footers parse php? I use your system here, it's the bomb, but I would like my templates to remain HTML only(user editing purposes). The problem is tht mysite is run on PHP and when I construct sections user this system OUTSIDE my forums, I have to make it parse the template in PHP(plus include some php functions in the template) to make it work. I could easily include that in the custom header, but the header doesn't work with php.
Logician, let me know what you think.
Logician
01-19-2006, 01:44 PM
I have a question. Is there a way to make the headers/footers parse php? I use your system here, it's the bomb, but I would like my templates to remain HTML only(user editing purposes). The problem is tht mysite is run on PHP and when I construct sections user this system OUTSIDE my forums, I have to make it parse the template in PHP(plus include some php functions in the template) to make it work. I could easily include that in the custom header, but the header doesn't work with php.
Maybe you can run them in the PHPinclude section of the webtemplate? Another idea would be running your code in vbulletin's PHPinclude section, make them ready as variables and use these variables in your custom webtemplate headers.
rasp187
01-19-2006, 02:00 PM
How can I change the name of this in the AdminCP to just "WebTemplates" as well as putting it below the vBulletin Options link?
msimonds
01-19-2006, 03:00 PM
Logician
My current site uses a cms that is custom:
it is still using vb 3.0.7 (patched) and the CMS is totally custom and uses a the template system within vb
http://www.sportsrant.com is actually a vb template called vb_news
could this template be used in your system, just wanted your input
this is a rather impressive system, nice job sir
regards
Mike
Sportsrant.com
Logician
01-19-2006, 05:28 PM
Logician
My current site uses a cms that is custom:
it is still using vb 3.0.7 (patched) and the CMS is totally custom and uses a the template system within vb
http://www.sportsrant.com is actually a vb template called vb_news
could this template be used in your system, just wanted your input
this is a rather impressive system, nice job sir
regards
Mike
Sportsrant.com
I'd say it would work if you run it inside forum directory. Apparently you are running outside vb directory but webtemplates is not designed to do so. Probably you can still make it display when you put it in a webtemplate but its URL will be http://www.sportsrant.com/forums/view_YOURPAGE.htm
Kihon Kata
01-19-2006, 07:11 PM
Would this increase server load? or DB queries?
Another idea would be running your code in vbulletin's PHPinclude section, make them ready as variables and use these variables in your custom webtemplate headers.
Logician
01-19-2006, 07:43 PM
Would this increase server load? or DB queries?
can't say anything without seeing your code but if it is a simple code that does not connect to DB, I'd say no
digitalSite
01-19-2006, 11:37 PM
Edit: How do I display "Current members online" instead of "Current members viewing this webtemplate"? In other words, I would like to display the member usernames who are currently logged in, just like at the bottom of FORUMHOME. Thank you!
Thank you for this hack!
Guest210212002
01-20-2006, 02:41 AM
How can I change the name of this in the AdminCP to just "WebTemplates" as well as putting it below the vBulletin Options link?
* Guest210212002 would also like to know
digitalSite
01-20-2006, 03:13 AM
Also, according to the manual, there is a vB template (not a webtemplate) that is named "WebTemplates_MemberLoginCode," but I do not see this one, I only see "WebTemplates_VisitorLogMain" and "WebTemplates_LoginCode" and some others. Does anyone else have this issue, or is it only me?
If it's just me, where can I change the look of the login box once a member has signed in? Or where can I get the Visitor template, if I am indeed missing it?
Thanks!
Logician
01-20-2006, 06:48 AM
* Chris-777 would also like to know
You have to play with this line at /includes/xml/cpnav_webtemplates.xml:
navgroup text="Logician's WebTemplates" hr="true" displayorder="1"
Logician
01-20-2006, 06:50 AM
Also, according to the manual, there is a vB template (not a webtemplate) that is named "WebTemplates_MemberLoginCode," but I do not see this one, I only see "WebTemplates_VisitorLogMain" and "WebTemplates_LoginCode" and some others. Does anyone else have this issue, or is it only me?
If it's just me, where can I change the look of the login box once a member has signed in? Or where can I get the Visitor template, if I am indeed missing it?
Thanks!
Template named "WebTemplates_LoginCode"
Kihon Kata
01-20-2006, 01:18 PM
I upgraded mine from .04 to .05 per instructions and it worked great. Didn't lose any templates.
Here is an example of some of mine:
Example of a Non vB page using this: http://www.makeuptalk.com/forums/view.php?pg=makeuptalk-newsletter
Example of a vB page using this: http://www.makeuptalk.com/forums/view.php?pg=daretobewinnerscircle
(Logician, add me to your examples!! ;))
Took some tweaking to make it work outside my forums, but the way Logician setup the viewing permissions, it simply rocks!
Template named "WebTemplates_LoginCode"
Guest210212002
01-20-2006, 01:53 PM
You have to play with this line at /includes/xml/cpnav_webtemplates.xml:
navgroup text="Logician's WebTemplates" hr="true" displayorder="1"
Thankya. I got it renamed no prob, just can't get it below the main options.
<navgroup text="WebTemplates" hr="true" displayorder="3">
digitalSite
01-20-2006, 02:01 PM
Template named "WebTemplates_LoginCode"
Thanks Logician! I always enjoy your hacks! I have a few more questions...
1) I have created a WebQuery that displays the "Last 10 threads" from any forum, but I would like to show only a limited number of characters in a thread title. In other words, I don't want the entire title displaying, instead, I would like to show something like: "This is a sample..." - Any help on this is greatly appreciated!
I have tried SELECT id, LEFT(title, 20), etc. but this didn't work for me.
2) I would like to remove the Powered by in the footer. How much do you charge to remove it?
Thanks!
nitro
01-20-2006, 03:01 PM
This seems to be very nice. My asociate runs the other way when I open vb and vbportal cp's. Now he can just ask for a new page and voila he can edit a page as much as he likes.
Found a minor bug or two tho when placing an image into and editor for TEXT. You can wrap it ok with img bb tags and save, but when you go to edit it again its wrapped it has parsed the url and needs the img tags redoing. Is there anyway to have the dont parse urls checkbox to the editors ?
Logician
01-20-2006, 04:27 PM
(Logician, add me to your examples!! ;))
Added. I liked what you did with the hack. ;)
Took some tweaking to make it work outside my forums, but the way Logician setup the viewing permissions, it simply rocks!
Maybe you can share what you did in the thread so that others will use it too? I'm asked this so many times and frankly speaking I dont have free time to deal with this request.
Logician
01-20-2006, 04:29 PM
Thankya. I got it renamed no prob, just can't get it below the main options.
<navgroup text="WebTemplates" hr="true" displayorder="3">
Set displayorder as 0 or 1 and if there are other hack options above WebTemplates, edit their xml files to increase their displayorder to push them down.
Logician
01-20-2006, 04:32 PM
Thanks Logician! I always enjoy your hacks! I have a few more questions...
1) I have created a WebQuery that displays the "Last 10 threads" from any forum, but I would like to show only a limited number of characters in a thread title. In other words, I don't want the entire title displaying, instead, I would like to show something like: "This is a sample..." - Any help on this is greatly appreciated!
I have tried SELECT id, LEFT(title, 20), etc. but this didn't work for me.
You can do it with SUBSTRING like .
SELECT id, SUBSTRING(title, 0 20)..
Please see here http://www.webmasterworld.com/forum88/6209.htm for more info
digitalSite
01-20-2006, 08:22 PM
You can do it with SUBSTRING like .
SELECT id, SUBSTRING(title, 0 20)..
Please see here http://www.webmasterworld.com/forum88/6209.htm for more info
Hi, I tried SELECT id, SUBSTRING(title, 0, 20), etc. and several variations I found in Google, but they are not working. It comes up blank. I know you're busy, so has anyone have theire titles of threads displaying on their site with only the first 10 or 20 characters? I would like to know how. Thanks.
Logician
01-20-2006, 08:36 PM
Hi, I tried SELECT id, SUBSTRING(title, 0, 20), etc. and several variations I found in Google, but they are not working. It comes up blank. I know you're busy, so has anyone have theire titles of threads displaying on their site with only the first 10 or 20 characters? I would like to know how. Thanks.
ok try this (import in webtemplate import screen).. I did with left()
digitalSite
01-20-2006, 11:03 PM
ok try this (import in webtemplate import screen).. I did with left()
Hi, this works! Now that we have the X character limit to display, there's just one other problem...the only thing is that although it says LIMIT 0,5 only the first post is shown.
How do we get last 10 to show?
Thanks so much...you should have received an email from PayPal ;)
nitro
01-21-2006, 05:40 AM
This seems to be very nice. My asociate runs the other way when I open vb and vbportal cp's. Now he can just ask for a new page and voila he can edit a page as much as he likes.
Found a minor bug or two tho when placing an image into and editor for TEXT. You can wrap it ok with img bb tags and save, but when you go to edit it again its wrapped it has parsed the url and needs the img tags redoing. Is there anyway to have the dont parse urls checkbox to the editors ?
Yep this would be very annoying. Everytime you edit a TEXT type in the front end in either text or wysiwyg mode it drops img bbcode tags and you have to replace them all. And if you have a few images on a page and forget one then you have to edit again and start agian. It also auto parse urls every save and no option to not do so.
When this is fixed I can consider installing. :)
Logician
01-21-2006, 07:26 AM
Hi, this works! Now that we have the X character limit to display, there's just one other problem...the only thing is that although it says LIMIT 0,5 only the first post is shown.
You are suppose to get last 5 in that forum. I get 5 in my test forum. Can it be because you have just 1 thread in that forum?
Logician
01-21-2006, 07:33 AM
This seems to be very nice. My asociate runs the other way when I open vb and vbportal cp's. Now he can just ask for a new page and voila he can edit a page as much as he likes.
Found a minor bug or two tho when placing an image into and editor for TEXT. You can wrap it ok with img bb tags and save, but when you go to edit it again its wrapped it has parsed the url and needs the img tags redoing.
I cant confirm this behaviour. When I use a IMG tag in a webtemplate and then go edit in the editor interface, it parses just fine. I tested both with standart editor and WYSIWYG, all works fine for me.
digitalSite
01-21-2006, 08:31 AM
You are suppose to get last 5 in that forum. I get 5 in my test forum. Can it be because you have just 1 thread in that forum?
Ha! This is true! I do only have one post in this forum...I guess my question should be, how do I list threads from ALL forums? Would I have to add every forum here
WHERE t.forumid = '1','2','3', etc.? Thanks!
I tried removing this WHERE t.forumid = (because I want from ALL forums) and replaced it with WHERE t.open = '1' AND t.visible = '1', but then the titles don't get limited and it posts the entire title.
OMG, I'm having a hard time with this...I noticed that when I run your code, it cuts the title to the limit you specify, but when I copy/paste your code into my webtemplate, it diplays the number of posts correctly, but doesn't cut off the title...any ideas why yours works and mine doesn't?
Logician
01-21-2006, 08:46 AM
Ha! This is true! I do only have one post in this forum...I guess my question should be, how do I list threads from ALL forums? Would I have to add every forum here
WHERE t.forum = '1','2','3', etc.? Thanks!
I tried removing this WHERE t.forum = (because I want from ALL forums) and replaced it with WHERE t.open = '1' AND t.visible = '1', but then the titles don't get limited and it posts the entire title.
Your WHERE close is right if you want to pull from all forums.
If you want to restrict title, you need to apply the left() to the title section too:
SELECT t.threadid, LEFT(t.title, 10) as title, t.firstpostid, t.lastpost, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, LEFT(p.pagetext, 10) as pagetext
FROM " . TABLE_PREFIX . "thread t
LEFT JOIN " . TABLE_PREFIX . "post p ON p.postid = t.firstpostid
WHERE t.open = '1'
AND t.visible = '1'
ORDER BY t.dateline DESC
LIMIT 0 , 5
digitalSite
01-21-2006, 09:09 AM
Your WHERE close is right if you want to pull from all forums.
If you want to restrict title, you need to apply the left() to the title section too:
SELECT t.threadid, LEFT(t.title, 10) as title, t.firstpostid, t.lastpost, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, LEFT(p.pagetext, 10) as pagetext
FROM " . TABLE_PREFIX . "thread t
LEFT JOIN " . TABLE_PREFIX . "post p ON p.postid = t.firstpostid
WHERE t.open = '1'
AND t.visible = '1'
ORDER BY t.dateline DESC
LIMIT 0 , 5
YEY! This works PERFECTLY! Thank you very much Logician, you're the best!!! (Doing the running man and dancing around the house now...)
For a look at my site, here is what it looks like now (my site is still under construction): http://www.naturalbeautycafe.net/
THANKS!
Logician
01-21-2006, 09:16 AM
YEY! This works PERFECTLY! Thank you very much Logician, you're the best!!! (Doing the running man and dancing around the house now...)
For a look at my site, here is what it looks like now (my site is still under construction): http://www.naturalbeautycafe.net/
THANKS!
Glad it worked. Added your site to the demo webtemplates in the first post. I must also tell it to my wife who might be interested being a member ;)
digitalSite
01-21-2006, 09:31 AM
Glad it worked. Added your site to the demo webtemplates in the first post. I must also tell it to my wife who might be interested being a member ;)
Great! No problem! I couldn't find a place online for those interested in all natural products, so I decided to create a community online :) :banana:
htscpl
01-22-2006, 03:43 PM
Thanks I've been looking for this. Just upgraded from vb 3.0.11. Lost the webtemplets. ** installs **
H :D
Logician
01-22-2006, 06:50 PM
Thanks I've been looking for this. Just upgraded from vb 3.0.11. Lost the webtemplets. ** installs **
H :D
Export script should export your old webtemplates for you? You can run it even now if you didnt manually deleted old wt tables.
nitro
01-22-2006, 09:05 PM
Its most strange, its only swapping IMG bb tags for URL= tags on my test install. I cannot replicate it live either. I decided to go for it anyway as this by all accounts is a long standing mod, so if its not happening to anyone else it must be some wierd setting somewhere making it happen. :)
I thought perhaps it was a style issue as I havent updated all the styles on my dev box but I've pretty much ruled that out aswell, it does do it in vb's default style which is untouched.
One comment the page title seems to not be editable in the front end only in CP. Might be nice to have some inline stuff on this mod for bits like that.
ammarcom004
01-22-2006, 09:15 PM
thanks for this hack
DaFire
01-23-2006, 03:13 PM
Hmm.. I'd like to allow certain usergroups to edit pages, which already works great with a few flaws. On my board with about 500 users I have only one admin beside me.. there are several sections with a own leader group but no access to control panel.
1. the editors should be able to toggle the draft flag and should be able to see the page in draft
2. the editors should be able to change the view permission.
Ideally I only create the page, set the allowed webquerys and let the editors do the rest. Even better if I could allow them to create pages themself, but without any possibility to add php code or include files or stuff like that :)
Bellinis
01-23-2006, 03:36 PM
I my navbar I use the following code to show a banner only to guests:
<if condition="in_array($bbuserinfo[usergroupid], array(1)) && THIS_SCRIPT != 'page_name'">
With this I can not only exclude member from viewing the banner, but also on certain pages for guests. How can I do this with the templates that this script creates? I've tried adding the names I give to these new pages, but it doesn't work. Any idea how I can make it work?
apleschu
01-23-2006, 04:56 PM
First of all please let me tell you THANKS! This is (almost) eggsagly what we were looking for.
What we would like to do is to give our members the ability to create templates(pages) for themselves without an admin having to create the page for them. Even better if I can say:
Each member of usergroup X has the ability to create Y pages. While still possibly enforcing them to have a common header and footer (as long as they use the free service)
Is that letting the users create their own pages somewhere in the development queue or is that a pipe dream of me?
Andy
Logician
01-23-2006, 06:15 PM
For comments about user editor interface such as:
What we would like to do is to give our members the ability to create templates(pages) for themselves without an admin having to create the page for them. Even better if I can say:
Each member of usergroup X has the ability to create Y pages. While still possibly enforcing them to have a common header and footer (as long as they use the free service)
1. the editors should be able to toggle the draft flag and should be able to see the page in draft
2. the editors should be able to change the view permission.
One comment the page title seems to not be editable in the front end only in CP. Might be nice to have some inline stuff on this mod for bits like that.
I know this part of webtemplates can pretty much enhanced according to many ideas such as these. But please note that user editor interface of webtemplates is not its primary function but it is just a nice&small add-on for a hack which basically allows "admins" to create vb integrated pages very easily.
The hack would exist even without this feature at all but I intentionally added this to the script to show in which ways it can be improved and introduces new hack ideas developed around this concept.
However please understand that I don't have any time for putting more efforts to this free script atm especially on points such as editor interface which are secondary part of the script. I appreciate the feedback but my apologies in advance in that they are not likely to be developped by me.
But one of the reasons I shared this hack here is to compile a "public effort" to develop it further. So I'm hoping that some other hackers will also see the potential of how it can be expanded and develop hacks for webtemplates and release with their names here so that new features and abilities can be added to the hack. Anyone is welcomed to do it. If they need help for the hacking of the hack, I'll do my best to help out too.
Logician
01-23-2006, 06:15 PM
I my navbar I use the following code to show a banner only to guests:
<if condition="in_array($bbuserinfo[usergroupid], array(1)) && THIS_SCRIPT != 'page_name'">
<if condition="in_array($bbuserinfo[usergroupid], array(1)) && THIS_SCRIPT != 'view'">
should work for you as vb knows webtemplate pages as "view".
Bellinis
01-23-2006, 08:44 PM
<if condition="in_array($bbuserinfo[usergroupid], array(1)) && THIS_SCRIPT != 'view'">
should work for you as vb knows webtemplate pages as "view".
Ok, thanks a lot! :)
dcpaq2xx
01-27-2006, 06:40 PM
Is there anyway I can modify the location of the Logicians Templates in the Admin Control Panel to display underneath the Vbulletin Options menu?
Also I don't know what the rest of you think but how about making the suggestion to Logician to change this in the program so that it displays below the Vbulletin Options menu as the default location?
Doug
Logician
01-27-2006, 07:03 PM
Is there anyway I can modify the location of the Logicians Templates in the Admin Control Panel to display underneath the Vbulletin Options menu?
Also I don't know what the rest of you think but how about making the suggestion to Logician to change this in the program so that it displays below the Vbulletin Options menu as the default location?
Doug
Please see here:
https://vborg.vbsupport.ru/showpost.php?p=877672&postcount=136
dcpaq2xx
01-27-2006, 07:10 PM
Please see here:
https://vborg.vbsupport.ru/showpost.php?p=877672&postcount=136
Thank you Logician for the link.
Also is this something you would consider permenently changing in the program as the default location?
It just seems proper that Vbulletin Options should be first in line and then yours.
Doug
Logician
01-27-2006, 07:16 PM
Also is this something you would consider permenently changing in the program as the default location?
It just seems proper that Vbulletin Options should be first in line and then yours.
Feel free to change it in your board but actually I believe WebTemplates link should be at the very top because when you build a site around webtemplates you are going to visit it much more than vb options link. :)
Guest210212002
01-27-2006, 08:05 PM
Logician,
I know I've sung the praises of this hack about 300 times already, but I want to mention again that my site just wouldn't be the same without it, so thank you. :D
That said, I have a quick, nagging, newbie question for ya.
I posted a thread here (https://vborg.vbsupport.ru/showthread.php?t=106458) about a similar issue (the same really) but since it also applies to WT, I'm hoping you can point me in the right direction.
All of my custom Webtemplates end up ungrouped in the style manager. If I create a new plugin in vB/General Admin/template_groups with the following:
$only['WebTemplates_'] = 'Custom Webtemplates'; it only ends up grouping the stock templates - all of the ones that are created by me still end up outside of the group at the top of the list.
What am I missing?
Thanks again. :)
dcpaq2xx
01-28-2006, 04:24 AM
Group,
The htaccess file that is in the forum folder...
I dont see anything in the installation instructions indicating to do anything with it or what it is for.
Is this file suppose to be placed anywhere, and if so what is it for or do?
Thanks
Doug
Logician
01-28-2006, 06:19 AM
The htaccess file that is in the forum folder...
I dont see anything in the installation instructions indicating to do anything with it or what it is for.
Is this file suppose to be placed anywhere, and if so what is it for or do?
Details in User Manual, section IV : How to Enable Search Engine Friendly WebTemplate URLs
EasyTarget
01-30-2006, 04:01 AM
hi Logician, I'm using the latest version of this but I seem to still have permission errors for users with quite a few usergroups.
I have the main user group set to yes and the various other groups set to no, and they get a no permission error.
Logician
01-30-2006, 06:33 AM
hi Logician, I'm using the latest version of this but I seem to still have permission errors for users with quite a few usergroups.
I have the main user group set to yes and the various other groups set to no, and they get a no permission error.
Sorry but this is not a bug, this is how the permission system works. More info:
https://vborg.vbsupport.ru/showpost.php?p=875765&postcount=118
Logician, do you have any plans to add nested categories functionality to this great hack? It would be totally awesome for those that use vBSEO and want to build their site completely around vBulletin, and yet have it SEO'd.
For example, If I could have a site.com/view.php?cat=tutorials&subcat=php&pg=seo, using vBSEO I could turn this into site.com/page/tutorials/php/seo
and so on. plus cateries would make it a lot easier to sort information when there are a lot of pages that need to be created.
EasyTarget
01-30-2006, 11:57 PM
Sorry but this is not a bug, this is how the permission system works. More info:
https://vborg.vbsupport.ru/showpost.php?p=875765&postcount=118
well according to that post that's the situation with secondary groups, but this is with a primary group.
I have no problems with the permissions on other parts of vb, its just in the pages created with webtemplates.
Logician
01-31-2006, 05:53 AM
well according to that post that's the situation with secondary groups, but this is with a primary group.
I have no problems with the permissions on other parts of vb, its just in the pages created with webtemplates.
Actually it does not matter whether it is a primary group or secondary. The important point in the hack's permission structure is that, if you check a usergroup as "banned usergroup" for a webtemplate, the user who in any way related to this usergroup (as a member of secondary of primary usergroup) will be denied access.
Logician
01-31-2006, 05:56 AM
Logician, do you have any plans to add nested categories functionality to this great hack? It would be totally awesome for those that use vBSEO and want to build their site completely around vBulletin, and yet have it SEO'd.
For example, If I could have a site.com/view.php?cat=tutorials&subcat=php&pg=seo, using vBSEO I could turn this into site.com/page/tutorials/php/seo
and so on. plus cateries would make it a lot easier to sort information when there are a lot of pages that need to be created.
I'm sorry but I don't have more time to commit for improving this hack. Any hackers who like to improve it has my blessing though.
EasyTarget
01-31-2006, 03:23 PM
Actually it does not matter whether it is a primary group or secondary. The important point in the hack's permission structure is that, if you check a usergroup as "banned usergroup" for a webtemplate, the user who in any way related to this usergroup (as a member of secondary of primary usergroup) will be denied access.is there any solution to this besides not using secondary usergroups?
my situation..
its a gaming forum with different teams. The team captain has access to stuff that the rest of his team doesn't. The team captain is a member of the team captain group and his team group. Because this hack handles permissions differently than the forum the team captain can't access the team captain page because he's a member of the team group.
There's also an administration page for admins. Some admins are also team members. The admins can't access their pages because they are also in the team group which can't have access to the administration pages.
is there any solution to this besides not using secondary usergroups?
my situation..
its a gaming forum with different teams. The team captain has access to stuff that the rest of his team doesn't. The team captain is a member of the team captain group and his team group. Because this hack handles permissions differently than the forum the team captain can't access the team captain page because he's a member of the team group.
There's also an administration page for admins. Some admins are also team members. The admins can't access their pages because they are also in the team group which can't have access to the administration pages.
That was the same problem that I ran into. It's just a different mindset for how you are using vbulletin's permission system compared to how Logician apparently uses it (both being perfectly valid methods)
Here is one fix:
WARNING: The following changes will completely reverse the way that Logician has set up the permissions for this Hack. DO NOT USE this unless you completely understand what it is for!!!
function WT_UsergroupPermission($userinfo, $return10 = 1, $usergroupname = '')
{
global $WT;
$permitted = 0;
$WT['banusergroups'] = trim($WT['banusergroups']);
if ($WT['banusergroups'])
{
$WT_banusergroups = explode(" ", $WT['banusergroups']);
if (WTis_member_of($userinfo, $WT_banusergroups))
{
$permitted = 1;
}
else
{
$permitted = 0;
}
if ($userinfo[userid] > 0 AND in_array('('.$userinfo[userid].')', $WT_banusergroups))
{
$permitted = 1;
}
}
if ($WT['draft'] == 1 AND !WTis_member_of($userinfo, array("6"))) //draft webtemplate
{
$permitted = 0;
}
if ($return10) //return 1 or 0
{
return $permitted;
}
else //return usergroup name with color (permitten green, banned red)
{
if ($permitted)
{
return '<font color="#006600">'.$usergroupname.'</font>';
}
else
{
return '<font color="#C40000">'.$usergroupname.'</font>';
}
}
}
EasyTarget, if you replace the default "function WT_UsergroupPermission" code found in wt_include.php with the above version, it will switch the way webtemplates permissions work from being an "opt-out" system to being an "opt-in" system. What that means is that the section marked
"Disallowed Usergroups
Mark usergroups who can NOT display this page"
Should now be treated as if it said
"Allowed Usergroups
Mark usergroups who CAN display this page"
and the "Disallowed Usernames" section should be treated as if it read:
"Allowed Usernames
Enter usernames who CAN display this page even if their usergroup is disallowed."
The above text will NOT ACTUALLY CHANGE unless you go in and edit it (I haven't bothered yet so I am not sure where it is), but you need to realize that by applying the above code you have completely changed how webtemplates processes usergroup permissions.
Logician is in no way responsible for the above change, and I am officially recommending that you do not apply this change unless you completely understand exactly what it does and are willing to accept complete responsibility for anything it or you may mess up in the process. (the code does work though, I have it running on two different live sites)
Logician
01-31-2006, 07:01 PM
Thanks a lot for your sharing your code with us. I didn't test it myself but if it is working as you explained, it can be useful to sites which use a different approach to this permission issue. I'll add it to the FAQ.
EasyTarget
02-01-2006, 04:40 PM
the section marked
"Disallowed Usergroups
Mark usergroups who can NOT display this page"
Should now be treated as if it said
"Allowed Usergroups
Mark usergroups who CAN display this page"
and the "Disallowed Usernames" section should be treated as if it read:
"Allowed Usernames
Enter usernames who CAN display this page even if their usergroup is disallowed."
The above text will NOT ACTUALLY CHANGE unless you go in and edit it (I haven't bothered yet so I am not sure where it is)thanks War, testing it out now.
Logician do you know where to find the above text so that I can edit how it reads? thanks.
EasyTarget
02-01-2006, 04:52 PM
I think I found it in wt_wt.php in the admincp folder.
CallieJo
02-02-2006, 01:05 AM
Cannot grasp how to pull a php page into this and have vb headers and footers show up as well...
CallieJo
02-02-2006, 01:20 AM
Okies...I can pull it up with:
<?php
echo $stylevar[htmldoctype];
echo $headinclude;
echo $header;
echo $navbar;
include ("http://www.mydomain.com/folder/index.php");
echo $footer;
?>
But after it submits the info from my form it goes back to that scripts default look...anyway to keep the vb look after submitting the form? Thanks...
sinoeu
02-14-2006, 12:30 AM
I wonder why such a useful and necessary founction didn't include in the original vbb ?!!
DaFire
02-14-2006, 07:14 AM
because it's a forum software and not a cms system ;)
afaik they plan a product like this.
leitel
02-14-2006, 04:39 PM
I am trying to format the output so that ONLY IF there is a 'dept', it will print out.
I tried putting code in the query output area as well as at the main page template.
$WQfield[name]<br/>
<if condition="$WQfield['dept']">
$WQfield[dept]<br/>
</if>
Thanks! :)
Trana
02-15-2006, 09:52 PM
I am having a little bit of trouble with the PHP template type. I have a PHP file that is working properly that pulls all banners from my phpadsnew database and displays it in a table. The page is sort of a "Our Sponsors" kind of thing:
<?php
echo $stylevar[htmldoctype];
echo $headinclude;
echo $header;
echo $navbar;
$host="localhost";
$user="xxxxx";
$password="xxxxx";
$database = "xxxxx";
$connection = mysql_connect($host,$user,$password)
or die ("couldn't connect to server");
$db = mysql_select_db($database,$connection)
or die ("Couldn't select database");
$query = "select alt, imageurl, url, bannerid from phpads_banners order by alt";
$result = mysql_query($query)
or die ("Couldn't execute query.");
/* Display results in a table */
echo "<center><strong>Our Sponsors</strong></center>";
echo "<div align='center'>\n";
echo "<table border='0' cellpadding='2'>\n";
while ($row = mysql_fetch_array($result))
{
extract($row);
echo "<tr>\n
\n
<td><a target='_blank' title='$alt' href='$url'><img src='$imageurl'</td>\n
\n
</tr>\n<td></td>";
}
echo "</table>\n";
?>
Why do I need to put the echo statements at the top? In the html templates I don't need to add those and it displays my style fine.
Also, why won't this template use the proper page title for the browser window? It just lists the URL and not the Site + User Friendly Name.
This is a GREAT hack btw!
Thanks!
rcull
02-18-2006, 02:28 AM
The more I study this, the more I like it!!!
Many of us have now installed programs like Photopost in the same database as VB3. Would it be possible to query the photopost info, like newest picture in a catagory with a table prefix like pp_ ?
rootnik
02-25-2006, 02:01 PM
is there a way to count the number or rows returned in a webquery?
Edit: I figured out how to do this by adding the following to my Query PHP include code (after) box.
$num_rows = mysql_num_rows($WQfieldDB);
echo $num_rows;
BUT, I need to be able to call $num_rows from within the template. Any help?
Logician
02-25-2006, 08:43 PM
is there a way to count the number or rows returned in a webquery?
Edit: I figured out how to do this by adding the following to my Query PHP include code (after) box.
$num_rows = mysql_num_rows($WQfieldDB);
echo $num_rows;
BUT, I need to be able to call $num_rows from within the template. Any help?
SELECT count(*) as mycount FROM " . TABLE_PREFIX . "user
$WQfield[mycount]
rootnik
02-27-2006, 02:17 PM
I am trying to format the output so that ONLY IF there is a 'dept', it will print out.
I tried putting code in the query output area as well as at the main page template.
$WQfield[name]<br/>
<if condition="$WQfield['dept']">
$WQfield[dept]<br/>
</if>
Thanks! :)
I'm also wanting to do something similar, but can not figure out how. Is it possible?
bashy
02-28-2006, 08:26 PM
Hi peeps
I am trying to make a new page with this script (below)
It does not show how i want it to
Basically what it does is pulls a specified search criteria off
eBay and lists it on a on a page as you can see the script is
php and i thought it might have just been a case of cut and
pasting it into a new template, evidently not as it dont pull
the search criteria.....
Anyway please try yourselves and see what i mean and see if
there is a work around for me :)
<?php
### Feel free to edit suitable values the first two values are very important
// tracking id is your ebay given id for affiliates
$TrackingID = '*****'; // ***** REQUIRED
// SID is for Commision Junction tracking and given to you by cj.com
$SID = "******"; // extra tracking
$TrackingProvider = "1"; // Either 0=No Affiliate, 1=Commission Junction, 5=Mediaplex
$DefaultItems = "NTL"; // Front Page items to display by default
### OTHER INFORMATION TO CHANGE (If Required)
$TableHeaderColour = "D5E1F5"; // results table header color
$TableBorderColour = "003399"; // Table Border Colour
$ResultsFontColour = "000000"; // Results Font Colour
$FontType = "2"; // 0=Arial, 2=Times New Roman, 3=Verdana,
$LogoType = "5"; // What eBay Logo to Display
$ResultsPerPage = '50'; // number of listings to show
$EndingTimeColour = "FF0000";
$TableWidth = "750"; // Width of eBay Table Results
### YES / NO
$SearchDescriptions = "n"; // search title and description y or n
$ShowImages = "y"; // Display thumbnails
$ShowEndTime = "y"; // auction end times
$ShowBidNumbers = "y"; // number of bids
$PopUp = "y"; // links open in a new window when this set to yes
$PayPal = "y"; // paypal logo appears when available
### COUNTRY LOCATION SECTION ** See Installion/Help Guide for Country Codes
$LocationSiteID = "3"; //
### END CONFIGURATION
$item = $_GET['item'];
if (!$item) {$item ="$DefaultItems";}
?>
<HTML>
<HEAD>
<TITLE><?php echo $item; ?> from the eBay auction place.</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>
<BODY>
<table width="<?php print "$TableWidth"; ?>" border="0" align="left" cellpadding="4" cellspacing="1" bgcolor="<?php print "$TableBorderColour"; ?>">
<tr>
<td align="center" valign="top" bgcolor="<?php print "$TableHeaderColour"; ?>">
<div align="center">
<form method="get">
<p align="left">
<input name="item" type="text" value="<?php echo $item; ?>" size="35" maxlength="100">
<input type="submit" name="Submit" value="Search eBay">
<br>
<font face="Verdana" size="2">
<A HREF="http://www.qksrv.net/click-<?php print "$TrackingID"; ?>-5463217?loc=http%3A//cgi4.ebay.co.uk/aw-cgi/eBayISAPI.dll%3FRegisterShow%26ssPageName%3Dh%3Ah% 3Areg%3AUS" target="_blank">
<B><font color="#000080">Register with eBay</font></B></A></font></p>
</form>
</div></td>
</tr>
</table>
<p><br>
<br>
<br>
</p>
<table border="0" align="left" cellpadding="4" cellspacing="1">
<tr>
<td align="center"><BR>
<BR>
<script language="JavaScript" src="http://ilapi.ebay.com/ws/eBayISAPI.dll?EKServer&ai=s%7di%3a%3d%3a&bdrcolor=<?php print "$TableBorderColour"; ?>&cid=0&encode=ISO-8859-1&endcolor=<?php print "$EndingTimeColour"; ?>&endtime=<?php print "$ShowEndTime"; ?>&fntcolor=<?php print "$ResultsFontColour"; ?>&fs=<?php print "$FontType"; ?>&hdrcolor=<?php print "$TableHeaderColour"; ?>&img=<?php print "$ShowImages"; ?>&lnkcolor=0000FF&logo=<?php print "$LogoType"; ?>&num=<?php print "$ResultsPerPage"; ?>&numbid=<?php print "$ShowBidNumbers"; ?>&paypal=<?php print "$PayPal"; ?>&popup=<?php print "$PopUp"; ?>&prvd=<?php print "$TrackingProvider"; ?>&query=<?php print "$item"; ?>&r0=3&shipcost=<?php print "$ShowShipping"; ?>&sid=<?php print "$SID"; ?>&siteid=<?php print "$LocationSiteID"; ?>&sort=MetaEndSort&sortby=<?php print "$SortBy"; ?>&sortdir=asc&srchdesc=<?php print "$SearchDescriptions"; ?>&tbgcolor=FFFFFF&tlecolor=FFCE63&tlefs=0&tlfcolor= 000000&track=<?php print "$TrackingID"; ?>&width=<?php print "$TableWidth"; ?>"></script>
<BR> </TD>
</TR>
</TABLE>
</BODY>
</HTML>
WNxWakko
03-05-2006, 04:16 AM
Selecting PHP does not work. I tested it by trying something simple.
I made a new page and only typed in one word in the body portion. Saved it and when I try to view, I get a blank white page. If I toggle it to html, my word shows up on the page.
Logician
03-05-2006, 06:39 AM
Selecting PHP does not work. I tested it by trying something simple.
I made a new page and only typed in one word in the body portion. Saved it and when I try to view, I get a blank white page. If I toggle it to html, my word shows up on the page.
There is a phptest template coming with default installation. Doesn't it work?
WNxWakko
03-05-2006, 03:13 PM
I just installed it yesterday. I dont know what default one you are talking about that is php.
Like I said, I did a simple test to see if it worked. I typed TEST in the content window, set it to php and I get nothing. If I set it on text or html my word shows up on the page.
Logician
03-05-2006, 03:19 PM
I just installed it yesterday. I dont know what default one you are talking about.
Like I said, I did a simple test to see if it worked. I typed TEST in the content window, set it to php and I get nothing. If I set it on text or html my word shows up on the page.
Installation STEP 3. Apply it. Then run webtemplate "phptest" and see if it is working.
WNxWakko
03-05-2006, 03:27 PM
Ok, installed your samples. Yes that phptest works. But I still dont understand why a fresh new one with nothing more than one word would'nt work.
My homepage is a .php file but its 99% html and then I have some php bits in it to call other information in. So perhaps your php is ment to be purly php with nothing more I dont know.
Logician
03-05-2006, 03:34 PM
Ok, installed your samples. Yes that phptest works. But I still dont understand why a fresh new one with nothing more than one word would'nt work.
My homepage is a .php file but its 99% html and then I have some php bits in it to call other information in. So perhaps your php is ment to be purly php with nothing more I dont know.
Reading user manual really helps: Section 1.3.1.4.3
Gehanna
03-12-2006, 05:30 PM
Installed and all I can say is Awesome!!
Thank You :banana:
FLMom
03-12-2006, 11:46 PM
Just downloaded this! I can't wait to install :D
FLMom
03-13-2006, 01:52 AM
Wow! I actually installed something without needing help!! WOOHOO!!
Okay, sorry about that LOL I'm a total noob and this was my first time doing this :D Thanks for making it so darn easy!
Brandon Sheley
03-13-2006, 11:54 AM
this is exactly what I've needed :D
now I'll be able to move URL's a not lose PR on these htm pages :D
thank you
* Brandon Sheley clicked install
klaush
03-13-2006, 01:38 PM
We are using this mod since the first release; now with 3.5.4 and it´s defenitely the best mod ever created for vb.
Thanks for sharing this, Logician!
FLMom
03-14-2006, 01:25 AM
I am sorry of this has been asked before...
I followed all directions and made an "About Us" page..more or less as a test for myself, but will eventually change it to the real thing. Anyway, how do I get that page to show up on my main page? I am using advance cmps and am still trying to figure it all out, but just can't seem too. I would like to put it at the top with all of the other things up there, (user cp, faq, members list, calendar, new posts, etc.), but am not sure how or if it is even possible.
If for some reason it isn't possible, would it be possible to add it to the left side of my page using the cmps?
Thanks for any help!
Brandon Sheley
03-14-2006, 02:53 AM
you can add a link in your navbar easily..
making it a page on your cms, would be a different area altogether
SpecOpsX
03-14-2006, 03:32 AM
Wow great mod thanks for it :)
I have one rookie question though, how can I give each custom page the look of the vb default theme. I tried copying and pasting the header/footer info to the template option but ended up with this
http://www.redzpage.com/vbl2k/view.php?pg=aboutus
Logician
03-14-2006, 07:00 AM
Wow great mod thanks for it :)
I have one rookie question though, how can I give each custom page the look of the vb default theme. I tried copying and pasting the header/footer info to the template option but ended up with this
http://www.redzpage.com/vbl2k/view.php?pg=aboutus
edit webtemplate about us.
select parse method TEXT
select "Using a Theme?" as default basic theme
select header as "default vbulletin header"
select footer as "default vbulletin footer"
FLMom
03-14-2006, 11:47 AM
How would I go about making it into a link in my navbar? I am very new to all of this.
On my site now, I have a site navigation box (module?) and in it I would like to put different catagories to different places on my site, then when clicked on it takes them to another page with links or information pages.
Is this something that is possible with this webtemplate 3.5? I made a generic about us page I am just trying to figure out if it can do more as well and if I can at least have members access it from my main page? Does any of this make sense?
FLMom
03-14-2006, 05:44 PM
I am sorry of this has been asked before...
I followed all directions and made an "About Us" page..more or less as a test for myself, but will eventually change it to the real thing. Anyway, how do I get that page to show up on my main page? I am using advance cmps and am still trying to figure it all out, but just can't seem too. I would like to put it at the top with all of the other things up there, (user cp, faq, members list, calendar, new posts, etc.), but am not sure how or if it is even possible.
If for some reason it isn't possible, would it be possible to add it to the left side of my page using the cmps?
Thanks for any help!
you can add a link in your navbar easily..
making it a page on your cms, would be a different area altogether
How? I am really new to this :(
blacklancer
03-14-2006, 07:06 PM
looks good so far! just installed and had no problems. thanks for doing this.
edit : one question. if i want to use the two column layout, can i modify the column on the left, or only the right??
arcadian_girl
03-15-2006, 01:38 PM
a question: (sorry if its a silly one, but i'm new to this)
this seems like a great mod. is it possible to make a page, and have an article on it, and have people be able to comment, logged into their vbulletin name? it sounds almost perfect, but i'd really like ppl to be able to comment on stories i post...
Logician
03-15-2006, 01:42 PM
looks good so far! just installed and had no problems. thanks for doing this.
edit : one question. if i want to use the two column layout, can i modify the column on the left, or only the right??
You can modify the left column by modifying its theme.
Logician
03-15-2006, 01:43 PM
a question: (sorry if its a silly one, but i'm new to this)
this seems like a great mod. is it possible to make a page, and have an article on it, and have people be able to comment, logged into their vbulletin name? it sounds almost perfect, but i'd really like ppl to be able to comment on stories i post...
You can make it display your articles but this does not involve reader commenting.
Logician
03-15-2006, 01:48 PM
How? I am really new to this :(
To put a webtemplate into your navbar, you need to:
1- login to admin cp
2- Click Style manager
3- Click the style you are using (make sure there is a tick left to it, if you have multiple ticks, do the steps above for all ticked styles)
4- Collapse Templates (Click the button that looks like >><< )
5- Double click "Navigation / Breadcrumb Templates"
6- Click template named "navbar" and put your link to the correct location into this template like:
<td class="vbmenu_control"><a href="view.php$session[sessionurl_q]" pg=YOUR_WEBTEMPLATE_NAME">Your Webtemplate</a></td>
To add it into your vbadvanced page, you need to ask it in vbadvanced thread/site, it is not about this hack.
Trana
03-15-2006, 03:53 PM
a question: (sorry if its a silly one, but i'm new to this)
this seems like a great mod. is it possible to make a page, and have an article on it, and have people be able to comment, logged into their vbulletin name? it sounds almost perfect, but i'd really like ppl to be able to comment on stories i post...
You should probably using GARS for something like this.
FLMom
03-15-2006, 05:52 PM
Thanks Logician for your help! :)
Krose
03-17-2006, 02:35 PM
Thanx for this great mod Logician, it's really easy to install...*clicked install*
Brandon Sheley
03-19-2006, 05:44 PM
how could I add the upcoming events ?
I tried just adding this code, but nothing shows
<if condition="$show['upcomingevents']">
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_events')"><img id="collapseimg_forumhome_events" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_events].gif" alt="" border="0" /></a>
<if condition="$show['todaysevents']">$vbphrase[todays_events]<else /><phrase 1="$vboptions[showevents]">$vbphrase[upcoming_events_for_the_next_x_days]</phrase></if>
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_events" style="$vbcollapse[collapseobj_forumhome_events]">
<tr>
<td class="alt2"><a href="calendar.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/calendar.gif" alt="$vbphrase[calendar]" border="0" /></a></td>
<td class="alt1" width="100%"><div class="smallfont">$upcomingevents</div></td>
</tr>
</tbody>
</if>
Kihon Kata
03-19-2006, 05:51 PM
Thanks Logician for including MakeupTalk.com in the Sample WebTemplates! :)
Brandon Sheley
03-20-2006, 05:08 PM
any ideas about what I'd like ?
if not show the newest events, then maybe the titles of the newest threads in one forum ?
I have the hack that makes a thread, when as event is added, so this would also work for me.. I just would like to find out how to add some events to one of my template pages..
thank you
-Brandon
Barakat
03-26-2006, 05:29 AM
works great ............. thanks since sooo long and iam trying to make some thing like that but a little bit easier .... thanks .
Nick0r
03-30-2006, 05:29 PM
Meta tags don't seem to be showing up as they are meant to. It seems they are simply not being inserted, is there a variable I can use in my 'theme' to prompt it to include meta keywords/description.
Logician
03-30-2006, 05:36 PM
Meta tags don't seem to be showing up as they are meant to. It seems they are simply not being inserted, is there a variable I can use in my 'theme' to prompt it to include meta keywords/description.
They are working fine for me. Please make sure you don't use this in a "PHP parsed webtemplate". If still not working for you, show me your webtemplate.
Nick0r
03-30-2006, 06:13 PM
Code for my theme:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$WT_PageName</a>
<meta http-equiv="Content-Type" content="text/html; charset=$stylevar[charset]" />
<link rel="alternate" href="$vboptions[bburl]/fps_external.php?type=RSS2" title="$vboptions[bbtitle] RSS Feed" type="application/rss+xml" />
$style[css]
<if condition="is_browser('opera')">
<style type="text/css">
ul, ol { padding-left:20px; }
</style>
</if>
<style type="text/css">
h3 { margin-bottom:8px; }
h2 { font-size:14px;}
</style>
<script type="text/javascript">
<!--
var SESSIONURL = "$session[sessionurl]";
var IMGDIR_MISC = "$stylevar[imgdir_misc]";
// -->
</script>
<script type="text/javascript" src="clientscript/vbulletin_global.js"></script>
<if condition="$show['popups']"><script type="text/javascript" src="clientscript/vbulletin_menu.js"></script></if>
<style type="text/css" media="all">@import url("ccmenu.css");</style>
</head>
$header
$tabbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"><tr><td><a href='.'>test</a>
<div class="smallfont" align="right">$includedtemplate</a></div></table>
$footer
</body></html>
Logician
03-30-2006, 06:57 PM
Code for my theme:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$WT_PageName</a>
<meta http-equiv="Content-Type" content="text/html; charset=$stylevar[charset]" />
<link rel="alternate" href="$vboptions[bburl]/fps_external.php?type=RSS2" title="$vboptions[bbtitle] RSS Feed" type="application/rss+xml" />
$style[css]
<if condition="is_browser('opera')">
<style type="text/css">
ul, ol { padding-left:20px; }
</style>
</if>
<style type="text/css">
h3 { margin-bottom:8px; }
h2 { font-size:14px;}
</style>
<script type="text/javascript">
<!--
var SESSIONURL = "$session[sessionurl]";
var IMGDIR_MISC = "$stylevar[imgdir_misc]";
// -->
</script>
<script type="text/javascript" src="clientscript/vbulletin_global.js"></script>
<if condition="$show['popups']"><script type="text/javascript" src="clientscript/vbulletin_menu.js"></script></if>
<style type="text/css" media="all">@import url("ccmenu.css");</style>
</head>
$header
$tabbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"><tr><td><a href='.'>test</a>
<div class="smallfont" align="right">$includedtemplate</a></div></table>
$footer
</body></html>
include
$headinclude
before
</head>
AlexUK
03-30-2006, 07:38 PM
Wow, just installed this.
I was looking for something like this, it is more than perfect for me. Many Thanks. :)
msimonds
04-03-2006, 01:24 AM
I have no idea. vbseo is an encrypted code so it is impossible for us to see what it is doing in the background or if it is clashing with a hack or not. If you want an educated guess, I'd say it would work unless you enable webtemplate's seo friendly urls. Give it a try and let us know too.
Yes this can be used with VBSEO, I have it in place! I will post some stuff over there later this week
msimonds
04-03-2006, 01:52 AM
I was talking to Logician via email and asked him some questions about moving this to another directory above the forums (example being if your forums was like mine:/forums/)
I made some small changes and even was able to add variables to the new template that I created. I was able to also apply vbseo to this.
This is a test page: http://www.sportsrant.com/testpage.html
I am still working on getting some things situated and straighted out, but this is one awesome hack and I am totally here to thank Logician personally, great hack sir
If anyone is interested and once I am done, I can try and help out getting this to work in any other folder besides your forums
Regards
Mike
Sportsrant.com
Great work, Logician :)
I have question about queries. I want to pass external variable to the query and it seems to controlled somewhere.
Example:
SELECT name,age FROM user WHERE age=$selected_age
$selected_age would be generated in another template with address, like this:
<a href=/view.php?pg=myageguys&selected_age=30>30 years old guys</a>
I have tried now and it seems that variable $selected_age is not passed to another template.
Is this possible? If so - how would you solve such problem?
Tom
Logician
04-03-2006, 09:40 AM
Great work, Logician :)
I have question about queries. I want to pass external variable to the query and it seems to controlled somewhere.
Example:
SELECT name,age FROM user WHERE age=$selected_age
$selected_age would be generated in another template with address, like this:
<a href=/view.php?pg=myageguys&selected_age=30>30 years old guys</a>
I have tried now and it seems that variable $selected_age is not passed to another template.
Is this possible? If so - how would you solve such problem?
Tom
https://vborg.vbsupport.ru/showpost.php?p=873850&postcount=107
defcon_420
04-03-2006, 12:29 PM
First of all i'd like to say Thank you for spending alot of time to make such a great product :)
i have only 1 question, i need an article section that i can catergorise, i'd like my users to be able to provide the content.
Is there a way for users to make the articles and can they be replied to?
thx very much
Annie^.^
04-03-2006, 01:04 PM
this is a great hack. I am having a little trouble tho.
When I create an HTML template and I select my custom header and footer it doesn't apply to the webtemplate only my basic default theme or absolutley nothing.
What am I doing wrong?
Logician
04-03-2006, 02:10 PM
First of all i'd like to say Thank you for spending alot of time to make such a great product :)
i have only 1 question, i need an article section that i can catergorise, i'd like my users to be able to provide the content.
Is there a way for users to make the articles and can they be replied to?
thx very much
I'm sorry but this hack wouldn't fit well for using as an article hack.
When I create an HTML template and I select my custom header and footer it doesn't apply to the webtemplate only my basic default theme or absolutley nothing.
Can you please rephrase? I couldn't understand what you meant well?
Annie^.^
04-03-2006, 02:51 PM
Sorry if I wasn't clear ...
Ok when I create a a New WebTemplate (HTML)
I select the Header and the Footer i created. After I finished and previewing the page the Header and the Footer is not showing on the page only the html code that I entered in the Text box.
Logician
04-03-2006, 05:21 PM
Sorry if I wasn't clear ...
Ok when I create a a New WebTemplate (HTML)
I select the Header and the Footer i created. After I finished and previewing the page the Header and the Footer is not showing on the page only the html code that I entered in the Text box.
You have to add "$header" and "$footer" to your webtemplate code. (without quotation marks)
Annie^.^
04-03-2006, 05:49 PM
I have tried that, but then the default forum template shows up on the page after previewing.
Logician
04-03-2006, 08:04 PM
I have tried that, but then the default forum template shows up on the page after previewing.
This shouldn't happen. If you don't mind, give me admincp access to your board and let me check.
blacklancer
04-04-2006, 08:54 PM
i read through, and maybe i missed it, but can this be used as a main page (i.e. index.html)??
i was trying to get vbcode to work on my home page (i was using vbexternal), but it wouldn't work no matter what i did. this works beautifully as i have tested it, but i am curious to see if i could use this as a home page for my forums.
Logician
04-04-2006, 08:58 PM
i read through, and maybe i missed it, but can this be used as a main page (i.e. index.html)??
i was trying to get vbcode to work on my home page (i was using vbexternal), but it wouldn't work no matter what i did. this works beautifully as i have tested it, but i am curious to see if i could use this as a home page for my forums.
Please check Webtemplate Pre-Installation FAQ: Question 7
blacklancer
04-04-2006, 09:30 PM
sorry man! http://www.sclc.net/forum/images/smilies/wall.gif
geezmo
04-05-2006, 08:34 AM
Ok, I can't go through all of the previous pages so pardon me if this has already been asked.
How do I make a simple template with the body of the article on the right and Google Adsense (not placed inside a box) on the left and the list of articles below AdSense? Do I need to edit the template? Which template and how to edit it? Or do I need to make a new template? How?
Thanks.
Logician
04-05-2006, 09:02 AM
Ok, I can't go through all of the previous pages so pardon me if this has already been asked.
How do I make a simple template with the body of the article on the right and Google Adsense (not placed inside a box) on the left and the list of articles below AdSense? Do I need to edit the template? Which template and how to edit it? Or do I need to make a new template? How?
Thanks.
Create a new webtemplate that uses "2 columned theme" as a theme and paste your content into this new webtemplate.
Then edit 2 columned theme and insert your google code inside it.
https://vborg.vbsupport.ru/showpost.php?p=873850&postcount=107
Dear Logician
Definitely I cannot find way to make it working. Would you please let me know WHAT shall I put WHERE? I have read your instructions carefully, made some tens of tests and still cannot pass variable to the query.
Regards
Tom
Logician
04-05-2006, 08:01 PM
Dear Logician
Definitely I cannot find way to make it working. Would you please let me know WHAT shall I put WHERE? I have read your instructions carefully, made some tens of tests and still cannot pass variable to the query.
Regards
Tom
I think webtemplate "priv_privatemessages" is a good starter to see how this is used. Its phpinclude field says:
$pm_number = intval($_GET['pm_number']);
if ($pm_number <= 0)
{
$pm_number = 30;
}
First line here is the important one and it tells webtemplates hack to know variable "$pm_number" as the GET value of 'pm_number' which comes through the URL.
So when you use an URL like
http://www.myboard.com/forum/view.php?pg=priv_privatemessages&pm_number=50
the value of $pm_number in the webtemplate will be 50. Then you can use it directly in your webquery just like I did in the webquery named "$WQ_priv_privatemessages".
Hope this clarifies better?
I think webtemplate "priv_privatemessages" is a good starter to see how this is used. Its phpinclude field says:
$pm_number = intval($_GET['pm_number']);
if ($pm_number <= 0)
{
$pm_number = 30;
}
First line here is the important one and it tells webtemplates hack to know variable "$pm_number" as the GET value of 'pm_number' which comes through the URL.
So when you use an URL like
http://www.myboard.com/forum/view.php?pg=priv_privatemessages&pm_number=50
the value of $pm_number in the webtemplate will be 50. Then you can use it directly in your webquery just like I did in the webquery named "$WQ_priv_privatemessages".
Hope this clarifies better?
It solves the issue :)
I have another question, which came also from
I am trying to format the output so that ONLY IF there is a 'dept', it will print out.
I tried putting code in the query output area as well as at the main page template.
$WQfield[name]<br/>
<if condition="$WQfield['dept']">
$WQfield[dept]<br/>
</if>
Thanks! :)
Or ony way/solution to $WQfield in a query result? Simple SQL does not solve my issued, let me present an example:
$query = "
SELECT category_id, name, parent_id
FROM categories
ORDER BY category_id, parent_id";
This query produces a list of categories & subcategories sorted. But I would like to format each row of the query depending on the result. For example:
if ($row->parent_id > 0) //means it is a SUBcategory
{ echo "Subcategory: "; } else { echo "-- "; }
I see, that there is a post query php code available and hope I can solve it somehow. Idea sharing is of the great help for me :)
BTW: I see in your documentation .doc file, that the is somewhere bigger help file for queries. Where is it exactly? :)
Regards
Tom
Logician
04-06-2006, 09:19 AM
It solves the issue :)
I have another question, which came also from
Or ony way/solution to $WQfield in a query result? Simple SQL does not solve my issued, let me present an example:
$query = "
SELECT category_id, name, parent_id
FROM categories
ORDER BY category_id, parent_id";
This query produces a list of categories & subcategories sorted. But I would like to format each row of the query depending on the result. For example:
if ($row->parent_id > 0) //means it is a SUBcategory
{ echo "Subcategory: "; } else { echo "-- "; }
I see, that there is a post query php code available and hope I can solve it somehow. Idea sharing is of the great help for me :)
BTW: I see in your documentation .doc file, that the is somewhere bigger help file for queries. Where is it exactly? :)
Regards
Tom
Sorry you can't do this one with webtemplates because "webquery phpinclude after" section is evaluated after all webquery data is processed, not in the middle of the compilation.
So all you can do is to use such a query:
$query = "
SELECT category_id, name, parent_id
FROM categories
where parent_id > 0
ORDER BY category_id, parent_id";
if this is not good enough, you need to code a custom script for your goal.
Clayton
04-06-2006, 01:26 PM
my apologies if this comes across as a stupid question, however can you use this with the CMPS installed?
Thanks
C
Logician
04-06-2006, 04:45 PM
my apologies if this comes across as a stupid question, however can you use this with the CMPS installed?
CMPS is your site home page, webtemplates are your other vb powered pages. They can get along together.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.