View Full Version : WebTemplates v.0.1 (Old Version)
Logician
03-21-2002, 10:00 PM
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Attention: This version of webtemplates is obsolete since new version (2.xx) (https://vborg.vbsupport.ru/showthread.php?s=&threadid=54875) is released as of 30.June.2003.
If you are new user, please visit new hack's thread (https://vborg.vbsupport.ru/showthread.php?s=&threadid=54875) and install that one, not this version.
This thread is active for discussing migration issues and will be closed in the future.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Introduction:
Basically this hack allows you create vbulletin powered non-vb pages within vb admin CP and administer them just like vb templates.
Your "webtemplates" reside inside MYSQL and have the same structure as regular vbulletin templates and you edit/modify/delete them inside your Admin CP. You can create as many as you like and display them like:
http://yoursite URL/yourboard URL/show.php?pg=YOUR_WEBTEMPLATE_NAME.
Features of Your WebTemplates:
* You can easily edit/update your non-vb pages from your vb control panel just like vb templates. No need to FTP or smt.
* Simply backup your vbulletin and your entire site (including your webtemplates) is backed up too.
* You can use some vbulletin variables in your non-vb pages, so eg. address your members with their member names in your entire site.
* Your entire web site can mimic your forum's visual interface. All your fonts/colors etc. are kept in your non-vb. pages too. Besides users' style sets apply for your web templates either. So for instance if you have 2 styles, every user will see your webtemplates in the style and colors they are using in the board.
* This hack allows you to specify usergroups/usernames which can or cannot see the page you designed. So your non-vb pages can inherit vb. access permissions. Every webtemplate can have different display permissions for different users/usergroups.
* You can have counters in your pages and show/trace page visits individually for all your pages. Every webtemplate has its own counter.
* You can have "last visitor's name and visit time" in all your pages.
* You can insert fixed header/footer for all your pages.
* The "conditionals" you can set, allow you to design advanced and dynamic web pages, which change themselves according to the conditions you set. For example you can set different texts/page designs IN THE SAME PAGE for different users and every user will only see the text that is addressed to him.
Webtemplates are very easy to create. Just copy paste the HTML code of your page into the webtemplate box, give it a name, click submit and voila, your webtemplate is up and running! By using this method, you can convert your existing non-vb pages into webtemplates with ease too. It is just a matter of copy/paste its HMTML code. Installation of the hack is easy too and the hack will work any version of vbulletin I know.
For Advanced Users: If you want your webtemplates to get data from your database and display it, you have an advanced feature named "webqueries". WebQueries feature allows you to run SQL queries in your MYSQL database and automatically create sorted tables for you which you can add in any WebTemplates. So your non-vb pages can be dynamic and you can have any kind of SQL results (related with vb or not) in any page you want. Webqueries are optional to use and appeals to people with basic SQL knowledge. You can still create webtemplates very easily without using webqueries if you don't know SQL or don't need to query your database in your webtemplate. If you want to play with webqueries, please read and follow instructions CAREFULLY. This hack gives you advanced tools to create powerful and dynamic web pages, so give yourself sometime and learn how to create these pages. I wrote help pages which you can find in your webtemplates section after installation, so please read them carefully and examine sample page's code before pelting me with questions! :)
If you installed this hack, share your webquery samples in this thread (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36578)
Fixes and Add-ons:
* If you have than 1 MYSQL databases, webquery section might not work properly. If you encounter any problems related to that issue, apply the small fix in this post (https://vborg.vbsupport.ru/showthread.php?postid=255547#post255547).[/COLOR]
* If you want to display your webtemplates in who is online, apply this small hack (https://vborg.vbsupport.ru/showthread.php?postid=386444#post386444) .
Also there is a small bug with "conditionals" feature of the hack, if you use more than 1 conditional in 1 webtemplate. I guess very few people use this feature but anyway I fixed it in the new release that is in progress..
* If you want your webtemplates search engine friendly and indexed in google or other search engines, read this tip (https://vborg.vbsupport.ru/showthread.php?postid=386256#post386256) by Piper.
Current version (BETA v.0.1) is NOT actually a beta anymore, it's proven to be working very well in many people's boards and is stable.
I plan to develop this hack. However to enhance it more, I need to change its algortihm which requires rewriting and I wait for VB3 so that the hack will will be competible with VB3 too. That's why development is pending at the moment.
If you install the hack please click install (https://vborg.vbsupport.ru/misc.php?s=&action=install&threadid=36419), thank you.
Regards,
Logician //=^))
Logician
03-22-2002, 03:58 PM
Some screenshots:
Please notice that the first two screenshots belongs to same non-vb web page (=webtemplate).
The page look different because screenshots have been taken from different users (TestUser1 and TestUser2) views. This clearly demonstrates the dynamic structure of webtemplates created with this hack.
http://www.turkhukuksitesi.com/images/testuser1_.jpg
http://www.turkhukuksitesi.com/images/testuser2_.jpg
And a screenshot from Control Panel:
http://www.turkhukuksitesi.com/images/admincp_.jpg
Regards,
Logician
JulianD
03-22-2002, 05:34 PM
Looks really good... I'm going to test it later, when I get to home.
slideboxer
03-22-2002, 05:56 PM
I haven't looked at it yet, but it seems quite incredible... What a job you've done!
DemiNeo0101
03-22-2002, 06:15 PM
Holy poop :)... This is great. *clicks install*
ok.. I am still not to sure what this does that I cant do already with vb or the fewa hacks already made on thie forum.... but it looks good none the less. nice job :)
TWTCommish
03-22-2002, 06:28 PM
I'm having a little trouble following it's use, but it looks interesting. :)
I'm installing this on my test forums, incredible!
Logician
03-22-2002, 08:31 PM
Originally posted by neo
ok.. I am still not to sure what this does that I cant do already with vb or the fewa hacks already made on thie forum.... but it looks good none the less. nice job :)
Well, the answer is lots of things pal. ;) This hack allows you to create and administer your site's non-vb web pages inside your vb control panel.
These pages will inherit your forum's user access permissions. So you can create web pages which can be accessible to certain usergroups and unaccessible for other groups. You can even permit or ban the pages according to forum user names, so your pages can be visible/invisible for a specific user(s).
Your pages will inherit styles and forum's visual design too. Thus every user will be able to monitor your web pages in their own style sets they set in their user cp.
Besides these web pages you created will be totally dynamic. For example you can create a web page which will list a user's last 10 recent threads and every user visited this page will see his last 10 threads.
You can even set specific conditions for your web pages. You can order your web page to load in a different way/post any text/have a different design if the page's visitor is X or if his age is under 18. Just use your imagination, any condition you can think of!
This hack is not a bulletin board system. It's a web site administration system which depends on your vbulletin board. :)
Hope this helps..
Regards,
Logician
03-22-2002, 08:32 PM
Originally posted by Dade
I'm installing this on my test forums, incredible!
Please let me know, how the installation went.. Thank you..
indiamike
03-22-2002, 09:18 PM
MY GOD...you can have my first born child.
This is amazing!!!!!!
I have a feeling that this is going to explode.
Mike
Originally posted by indiamike
MY GOD...you can have my first born child.
This is amazing!!!!!!
I have a feeling that this is going to explode.
Mike
:surprised: I gotta test this one out...
ptbyjason
03-22-2002, 10:52 PM
Oh WOW! I didn't think this was a big deal until I saw your reply to neo. Very nice. Great Job. I will try to install this soon. Now I am going to think about something to do with it as soon as I can. :)
I installed it, its very cool, but a downside it creates FAR too many calls to show.php in my opinion. This hack is great for the site that is 100% its fourms, you can't really build an entire site around this hack, but easily create a bunch of great little pages. Good hack man! 5 Stars!
Vivi Ornitier
03-23-2002, 01:19 AM
Ok... WONDERFUL sounding... but what are the down falls... their is always down falls?
LawnDawg
03-23-2002, 03:14 AM
Oooh man, did he beat Nakkid to the release? =| I recall nakkid working on somethin similiar to this, vBHome I believe.
But nice job nonetheless :) Whatever benefits the community.
Logician
03-23-2002, 07:28 AM
Originally posted by snyx
I installed it, its very cool, but a downside it creates FAR too many calls to show.php in my opinion. This hack is great for the site that is 100% its fourms, you can't really build an entire site around this hack, but easily create a bunch of great little pages. Good hack man! 5 Stars!
Ok it seems that many people got the pros so lets discuss the cons, shall we?
When you create a page (ie webtemplate) with this hack, it will reside in your MYSQL database. This means that everytime this page is called by your users your site have to relate with MYSQL which will create a overhead (CPU usage) compared to static HTML pages.
If you want to have dynamic (ie changing for every user) pages then you have to bear this overhead because server has to interrelate with something to get and process data to create a dynamic page. This can be SQL DB, another file on the server etc. and in our hack that is mySQL.
If you have a informative static page, there is no need to convert it to a webtemplate. It will be safe and reduce the load in your server if you leave it as a HTML page. However if you need to create dynamic pages which derive their strength from your forum db, then this hack gives you the tools you need.
Well, lets see how much overhead it requires:
First go check your forum's main page's overhead:
call this link (YOUR FORUM URL)/index.php?explain=1
Go at the end of the page and see how many queries did your forum's main page requires while loading.In my forum it's 20 which is a quite reasonable number (at least for vb). (FYI for showthread.php this number is much higher)
Now do the same thing for my hack: (after installation of course!) :)
Call this link (YOUR FORUM URL)/show.php?pg=whoareyou&explain=1
You'll see that while loading the page, server will connect the database only for 10-14 times which is 1/2 of your forum's main page overhead. I think this is quite reasonable. Moreover if you disable page visit ($count variable), reduce the webqueries in your webtemplate you'll lower this number. So on the average a web template with one Webquery in it will only connect to your MYSQL 10-12 times and that is bearable considering the fact that you get a powerful and nice dynamic (fully integrated with your vb) page in return.
I hope this clarifys this hack's performance issues..
Regards,
Logician
Logician
03-23-2002, 07:43 AM
Originally posted by snyx
I installed it, its very cool,
I know many people are interested in the hack itself and its features but honestly my primary concern at the moment is how it's working in different user's forums. Hack is BETA so I need any feedbacks about installation and working issues.
So guys if you install this hack, please report how it is doing in your server? Any installation problems? Does sample page (whoareyou) loads as it should be? Do access permissions working ok (eg. page should only allow admin and forum members to load it, guests for example should get "not allowed" remark). Do web queries in that page work? Do you get your last 10 threads and personal calender events?
I appreciate any feedback. Thank you..
Regards,
Logician
Logician
03-23-2002, 10:39 AM
Hey there,
Originally posted by TWTCommish
I'm having a little trouble following it's use, but it looks interesting. :)
Well it's a bit confusing, I agree :knockedout:
Let me give an example of its usage from my own site:
I administer a non-commercial law site which is dedicated and addressed to professional law men. As you can guess our board (vb) has a crucial effect in my web site because it maintains a very efficient communication among law professionals.
In my forum we also have a "newbie legal questions" forum area which stands for non-lawmen visitors' legal questions. We also have a few informative web pages (outside the board) in our site for these non-lawmen visitors.
After installing my board, I decided to include dynamic content to these web pages which are outside the board. I wanted to compile last 10 answered threads from "newbie questions" area and list them in the web page. This would be nice because this web page would only be read by visitors who are not lawmen and they would be highly interested with the answered questions from this specific forum area and I would get them to this area and my board from this web page.
I first planned to create this page with PHP and but then I noticed that I want to have many dynamic pages like this and it would be arduous to code many PHP scripts individually for every page and more arduous to maintain them in the future.
So this hack was born. Instead of coding many PHP scripts all of which in common compile data from vb with SQL queries (=WebQueries), have the same visual design, headers/footers etc., I wrote this hack that gives me the ground to easily administer these pages. (=webtemplates).
Now whenever I need a web page that requires dynamic content and interaction with vbulletin data, I can create a webtemplate/webquery and although this page is a standart HTML page outside the board, I can have any kind of data from vbulletin in this page. Besides visual design of this page is easier any more, because it's automatically handled by the script according to my vbulletin's styles and colors. If I want I can permit/ban access to this page for certain users or usergroups either. I can even insert hidden personal notes for certain users or usergoups inside this page.
So dont think this hack something that extends vbulletin board features. It extends your non-vb web page features and integrates them with your vbulletin board.
I hope this practical usage of this hack can shed a light about its use and features.
Regards,
Logician
KuraFire
03-23-2002, 01:11 PM
Very impressive, and a very good idea. It's a pity my sites will be too complex for this to be useful in my particular case, but I can see this becoming one very very popular hack in time, as the possibilities are seemingly endless, and the usefulness is very high! :):up:
Lesane
03-23-2002, 03:57 PM
Great hack/addition. Well done
version
03-25-2002, 10:25 AM
this is basically what i did with my site. i respect that you put a nice face to it, but 'inheriting permission' is no harder than putting a include("./forums/global.php") in your source. should be helpful to quite a few people who don't want the bells and whistles of vbportal, but still maintain integration with vb.
Logician
03-26-2002, 03:28 PM
Guys,
If you installed this hack, share your webqueries in this thread (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36578)
To start the sharing and demonstrate what can be done with this hack, I posted a WebQuery+WebTemplate sample which will give you a page you can read last XX member private messages in your board. Find it there..
Regards,
jamesdasher
03-28-2002, 01:57 AM
Hi, Logician...
Anyway, sounds like an interesting hack. The only question that I have is this.
Why should I use your hack instead of doing something like the following:
<?php
// Default Information - Start with this
error_reporting(7);
$templatesused='forumhome_welcometext,forumhome_lo goutcode,forumhome_newposts,forumhome_todayposts,f orumhome_logincode';
require('./global.php');
$permissions=getpermissions();
if (!$permissions['canview']) {
show_nopermission();
}
// Default Information - End
// if user is know, then welcome
if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
eval("\$welcometext = \"".gettemplate('forumhome_welcometext')."\";");
eval("\$logincode = \"".gettemplate('forumhome_logoutcode')."\";");
eval("\$newposts = \"".gettemplate('forumhome_newposts')."\";");
} else {
$welcometext = "";
eval("\$newposts = \"".gettemplate('forumhome_todayposts')."\";");
eval("\$logincode = \"".gettemplate('forumhome_logincode')."\";");
}
eval("dooutput(\"".gettemplate('home')."\");");
?>
that is a very basic custom page that calls vBulletin templates, plus a custom template (called: home). It doesn't have any layout or anything, and I haven't done that much, but it is just like any of vBulletin's normal pages (just no current 'functionality' though it is easy to add, just displays information depending on vBulletin cookies)?
to see the above page in action go to http://www.teenssucceed.com/home.php
That is very easy to do with some custom templates and a basic understanding of how a vBulletin page works (the basic template outputs, etc.)
Why is your hack any better then doing it as above?
Oh, the one custom template used in the basic example above contains the following:
<html>
<head>
<!-- no cache headers -->
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Cache-Control" content="no-cache">
<!-- end no cache headers -->
<meta name="keywords" content="vbulletin,forum,bbs,discussion,jelsoft">
<meta name="description" content="$bbtitle is a discussion forum powered by vBulletin. To visit the forum, go to $bburl/ . To find out about vBulletin, go to http://www.vbulletin.com/ .">
<title>$bbtitle - powered by vBulletin</title>
</head>
<body>
{htmldoctype}
<p>
$headinclude
<p>
$header
$welcometext
$logincode
$newposts
$footer
<!-- /icons -->
</body>
</html>
James
ja5es
03-28-2002, 02:41 AM
*throws away current project*
crap this is awesome! even better than what I was going to do! :D
Logician
03-28-2002, 06:18 AM
Hey James,
Originally posted by jamesdasher
Why should I use your hack instead of doing something like the following:Why is your hack any better then doing it as above?
* Your sample templates lack the ability to be administered inside vb cp.
* Your sample lacks the ability to have "conditionals", that is simple "if" clauses you can set in your templates without PHP knowledge.
* Your sample lacks the feature to do SQL queries in your db and create automatic tables in HTML, without PHP and even SQL knowledge.
* Your sample requires PHP coding for every template you need to design, especially if you need to ban the template to your users user1 and user2 only or you need to put a hidden text which will be shown to certain users.
What my hack does can be done by coding individiual PHP pages. This hack is no miracle and I didnt say that you cant have the same effects/pages by programming your own PHP scripts. Please read my answer to TWTCommish: This hack gives you to ground to create MANY dynamic pages easily without arduous job of coding, besides you can even have dynamic pages/queries even if you dont know PHP or SQL.
I created this hack for my own site. I could have the same dynamic pages by programming individual PHP scripts but I found it more easy to have a "system" that gives you the ground to easily control these pages without coding them individually. I added "WebQuery" feature to have db Query results easily. Even a guy with 0 knowledge of PHP and SQL can have dynamic pages with this hack by just inserting other's WebQuery's from vb cp.
If you are a PHP/HTML/SQL Wiz and commit time to code your own scripts, then you need neither my hack, nor ANY hacks in this site. You dont even need this site itself! You can create ALL the hacks in this site, by coding your own scripts or hacks. You can ask all hack writers: "I can do this by this PHP code too and why is yours better than mine?" and well, of course you can, you are also a programmer and as you may very well know, same effects can be achieved by different programs. :cool: So your question is unanswered, not only for my hack, but all these hacks in this site.
Regards,
jamesdasher
03-28-2002, 02:44 PM
Okay, got ya...I think I understand your hack now...thanks for taking the time to help me out :)
James
P.S. I wish I was a 'programmer' but I am not, I have just spent some time getting to understand the vBulletin template system and am able to call and direct pretty well.
WizyWyg
04-12-2002, 07:21 PM
Great hack so far, and room for more potential (It works by the way with no problems of installaiton and Im using it in conjuction with vbportal)
I was wondering if it could be possible to add to it.
I was wondering if it would be possible to change the query for the last 10 and instead of pulling the last 10 threads he/she has posted to the forum, pull only "all" threads he/she has posted to a private forum?
Edit:
Figured out how to do the post all threads (take off limit 10)
But how do I make the query only look at the private forum that he/she only has acces to? And apply to to every usergroup? I have all my users in usergroups (so no one under registered or groupid 2
I think i have the idea to make similar "whoareyou" templates for each usergroup I have so they would only have access to it. Would that be wise to do?
Another q:
Is it possible that instead of taking the user to the actual forum itself to view the thread, but to pull the contents of the thread and have them be viewed in a "threaded" format?
Is this possible?
Logician
04-12-2002, 07:39 PM
Originally posted by WizyWyg
I was wondering if it would be possible to change the query for the last 10 and instead of pulling the last 10 threads he/she has posted to the forum, pull only "all" threads he/she has posted to a private forum?
Sure you can! This is what this hack is for: You can have ANY SQL queries in your database and you can make it listed in any Webtemplate you created.
So all you have to do is to add a new "WebQuery" that does the SQL query you need, then attach this webquery to any webtemplates to automatically list it in your page.
One downside: At the moment this hack does not list sql select results in pages in which you click and get the page 2, 3, etc..So you have 2 options: You can query ALL threads and if the query returns say 700 results, all will be listed in one page! Or you can limit your query with SQL command LIMIT then whatever numbers your user has, only your limited number of results will return.
Anyway if you have problems in designing your Webquery, ask me here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36578) and I can help you with the query.
The Piper
05-16-2002, 05:31 PM
I had already installed WebTemplates in a test board a few weeks ago. Now I tried to install it on my main board, with no success. I did and re-did everything that is described on the installation instructions, but nothing seems to work:
When I go to
http://www.pinkfloydfan.net/forums/show.php?pg=whoareyou
I get a "mySQL error:No Database Selected"
When I go to
http://www.pinkfloydfan.net/forums/show.php?pg=Webtemplatehelp
I get the "The page you requested does not exist!" error message.
Installation went fine and I'm not sure why this is happening. I'd really appreciate your support.
Thanks,
Paulo
Logician
05-16-2002, 07:39 PM
Please check the screenshot attached..I got this screen when I tried to call the url you referred. Dont you get this screen?
This screen indicates that hack has been installed successfuly and it's working. If you get the error after you login, this is very likely because there is something wrong with the webtemplate you are trying to access (not the hack itself).
If so please double check there is nothing wrong with the webtemplate you are trying to access. Try this text to replace your "whoareyou" webtemplate:
-- cut--
everybody1 2 TestUser2 6 testuser1
templatequeryon
{htmldoctype}
<html>
<head>
<title>$bbtitle</title>
<p align="left">$headinclude </head> <body> $header <br><p>
<p align="left"> <normal>TEST PAGE LOADED SUCCESSFULLY!</normal></p>
$footer
-- cut --
Login with the user userid 1 and lets see if it works now..
Khaybel
05-16-2002, 08:15 PM
great hack I've been looking for something like this with out having to use a vbportal, I'm prob going to try and content most of my site over to this hack. (http://www.orbsydia.com) as I've been wanting to convert my site to php anyway, this will really speed things up. :)
When it's all done let me know where to send a donation ;) or two... and where to download your final after beta ;)
Logician
05-16-2002, 08:34 PM
Originally posted by Khaybel
When it's all done let me know where to send a donation ;) or two... and where to download your final after beta ;)
Khaybel I'll be much more delighted if you return me feedback about the hack, instead of a sending a donation :)
I understand people posting about their problems but I would like to hear "hey I installed it and it works without any problems" messages, especially considering the fact that this is beta. Same applies for number of people who installed this hack, which certainly does not help motivating me improving the hack more as I mentioned in the other thread.
However if you are determined to spend a few bucks, just donate to a charity of any kind. That will sure make me happy! :cool:
Thanks for the nice comments..
Regards,
Logician
Khaybel
05-17-2002, 01:06 AM
I just finished installing the hack, it went in smoothly, I'm sure if it was on a php version of the forums it would be perfect for the install, although I use the php3 versions of the forums, so had to make a few name changes from php to php3, but nothing major.
I used ultra edit to do a mass fine and replace for your php to php3 extensions.
Small update: As of june 1st/2002
Just got new rack server, so reinstalling this hack with 226, will post new layout link with script in action when I have it up, thank you for all your hard work.
The Piper
05-22-2002, 01:16 AM
Hi Logician,
Thanks for your answer and sorry I took I while to write back. Real life has been a bit hectic. I just reinstalled vB 2.2.5 just to be sure none of the hacks I had installed was interfering with WebTemplates.
Anyway, I reinstalled the hack and almost everything works fine now:
The template webtemplate_help is showing up perfectly. However, whoareyou still gives me a "mySQL error:No Database Selected" error. I tried to create a new template, identical to whoareyou, called test, and played with it for a while.
I found out that the line
templatequeryon
Is what messes things up. If I remove that line, as I did in the template "test" (check it out, I changed it also to everyone[/cantsee], so you should be able to: http://www.pinkfloydfan.net/forums/show.php?pg=test), things show up, although the queries don't work (of course).
I'd really appreciate your input on this. I'm planning on using WebTemplates to run my entire site, along with vbIndex and/or vbHome (Lite).
Again, many thanks for your help and congratulations on creating one of the best hacks I've ever seen!
Shine on,
Paulo
Originally posted by Logician
Please check the screenshot attached..I got this screen when I tried to call the url you referred. Dont you get this screen?
This screen indicates that hack has been installed successfuly and it's working. If you get the error after you login, this is very likely because there is something wrong with the webtemplate you are trying to access (not the hack itself).
If so please double check there is nothing wrong with the webtemplate you are trying to access. Try this text to replace your "whoareyou" webtemplate:
-- cut--
everybody[cansee]1 2 TestUser2 6 testuser1
templatequeryon
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>$bbtitle</title>
<p align="left">$headinclude </head> <body> $header <br><p>
<p align="left"> <normal>TEST PAGE LOADED SUCCESSFULLY!</normal></p>
$footer
-- cut --
Login with the user userid 1 and lets see if it works now..
Logician
05-22-2002, 07:46 AM
Originally posted by The Piper
templatequeryon
Is what messes things up. If I remove that line, as I did in the template "test" (check it out, I changed it also to [cansee]everyone[/cantsee], so you should be able to: http://www.pinkfloydfan.net/forums/show.php?pg=test), things show up, although the queries don't work (of course).
Can you put the line back in the template. I want to see the error message. And needless to say: Your webqueries (that is in the webtempate) exists in your database right? If webtemplate tries to process an webtemplate which exists in the webtemplate but does not exist in your database (ie vb cp), this error can occur. So please double check you have existing (at least default) webqueries in your admin cp. (via modify webquery). If I'm not wrong you should have
_last_10_threads [edit] [remove]
Gets user's last 10 threads from forum database
_privateevents [edit] [remove]
Gets user's recent private calender event list
webqueries by default. Check their content seems intact too..For example as for _privateevents :
Query is:
SELECT eventid, eventdate, subject FROM calendar_events WHERE userid="$user_userid" AND public="0" ORDER BY eventdate ASC
Table Row is:
<li><normalfont><a href="$bburl/calendar.php?s=&action=getinfo&eventid=??eventid??">??subject??</a></normalfont> <smallfont>(??eventdate??)</smallfont></li>
Does they look good?
The Piper
05-22-2002, 10:14 PM
Sure, the line is up again in the template (http://www.pinkfloydfan.net/forums/show.php?pg=test), which looks exactly like the whoareyou template, except that everyone could technically see it.
I still get a blank page with only "mySQL error:No Database Selected" on it.
I also double-checked the default webqueries and they seem ok, just like you said.
I'm really clueless about this. The weird thing is that the first time I installed WebTemplates, just after installing vB for the first time and testing it for a while, it seemed to work fine...
Thanks anyway for your help and support!
Paulo
Logician
05-23-2002, 05:38 AM
piper, it seems that something is wrong with "webtemplatequery" table. The installation may not be successfully completed for some reason or the table may become corrupted later. So let's check this:
First get this script, edit the first few lines and upload it to your server: https://vborg.vbsupport.ru/showthread.php?s=&threadid=38262 (If you dont have any tool to run SQL queries). Then run the script and run this query:
select id,name,query,noresulttext,tablerow from webtemplatequery order by id;
Tell me what it returns back, if any..If it returns that table is corrupted, apply this command:
REPAIR TABLE webtemplatequery;
If it says table does not exist, run installation script one more time..
The Piper
05-23-2002, 05:31 PM
Logician, here's a screenshot of what came up after I installed logician_query.php and ran that query.
I also did repair the table, although it didn't seem to be corrupted, but it didn't do any good, I still get that error.
Thanks a lot for your support, and sorry to be bugging you with this... :)
Paulo
Logician
05-25-2002, 04:18 PM
Hey everybody,
Good news: I am planning to work more on WebTemplates hack and release a new (non-BETA) version with improvements. If you are using the hack, I want to hear your requests about the hack. I cant promise I can meet all requests but they are welcomed.
What I've already planed is:
* Small bug fix that gave The Piper some bad time. If you have more than 1 databases in your server, hack refuses to work with WebQueries. This will be fixed.
* WebTemplate visits will be nicely displayed in Who is Online like:
"UserX viewing WebTemplate: XXXX".
* Date fields returned from WebQueries will be formatted according to visitor's time settings. So you can display them in your webtemplates too..
* Texts in board messages, private messages and calender events will be parsed properly. So all smilies//bb code etc, will be displayed as your board displays them and you can use them in your webtemplates too..
If you have any other ideas, feature requests, feel free to share, thank you..
BTW. if you use this hack and didnt click install yet, please do! I really want to know how many people use this hack. This helps a lot to me to decide if I'll work on this hack more and improve it..
Regards,
Logician
Khaybel
05-26-2002, 06:15 AM
I've been working with web templates the past few days now, everything seems to be working well now, I'm still linking everything up on a test site before turning my main site into it.
I'm currently using a combo of Vb255/VbHome (lite)/ and your webtemplates to link other dynamic pages together. I am making a wish list for you then will post here as requested. I'm playing with setting up a web gallery template with your template system to my site, I've been having a lot of fun learning and experimenting. so thank you for your hard work on the project.
I've been working on it most of today, I have a link if you would like to see how it is coming along. The goal is to get my products/development/gallery etc etc linked up to the site with your template system.. if a link doesn't work it's cause i'm still testing. so far the install went beautifully again with my testsite.
http://testsite.orbsydia.com/index.php3
thanks
Rob
Highlander
05-28-2002, 04:51 PM
wow its very very good hack...and easy to install..you relly explained it good...
the only thing is to know the queries..the comman wich you put will not show any help file ??!!
Logician
05-28-2002, 07:34 PM
Originally posted by Highlander
the comman wich you put will not show any help file ??!!
I really didnt understand the question..
For Webqueries there is a special help page..Please first read that one. Then examining the sample page (whoareyou) and sample webqueries can help you understand the system and if there is anything you still cant understand, please ask away, but more clearly! :)
Regards,
Logician
Robert Basil
05-28-2002, 08:00 PM
Originally posted by Logician
* Small bug fix that gave The Piper some bad time. If you have more than 1 databases in your server, hack refuses to work with WebQueries. This will be fixed.
We would love to use your hack, but we have 6 mySQL databases on our server. So am I correct in assuming that I cannot use this hack with more than one database on our server?
I'm not sure I understand why your hack just does not point to the correct VB database.
Thanks!
Logician
05-29-2002, 07:58 AM
Originally posted by Sportbikeworld
We would love to use your hack, but we have 6 mySQL databases on our server. So am I correct in assuming that I cannot use this hack with more than one database on our server?I'm not sure I understand why your hack just does not point to the correct VB database.
In fact we discovered this bug recently and although I've already fixed it, I'm just too lazy to update the script here.
You can use the hack: Just install it and see if you can load "whoareyou" template without any problems. If you get an MYSQL ERROR while loading this template, edit "show.php", find the line:
$cekilen_query=mysql_query("select id,name,query,noresulttext,tablerow from webtemplatequery order by id");
BEFORE THAT add:
--- cut --------------
$servername='localhost';
$dbusername='root'; //MYSQL username
$dbpassword=''; //MYSQL password
$dbname='xxx'; //database name
mysql_connect("$servername", "$dbusername", "$dbpassword") or die("Couldnt find MYSQL!");
mysql_select_db("$dbname") or die ("Couldnt find DB!");
--- cut --------------
Dont forget to edit your db details and you'll be just fine..
Enjoy!
Logician
Lionel
06-14-2002, 03:23 AM
I installed successfuly, everything works fine from admin but the query /show.php?pg=whoareyou returns
mySQL error:No Database Selected
in case that makes a difference: Although show.php is in the forum folder, I ran WEBTEMPLATES_INSTALL.PHP from the admin folder
never mind, I did not read post 45. :rolleyes:
irn-bru
06-14-2002, 01:42 PM
This is indeed one of the best addons I have seen at vbulletin.org
nice work Logician :)
DancesWithLysol
06-17-2002, 02:26 AM
Excellent work, Logician!
Prior to installing this hack I had installed your news hack.
One of the first templates I will attempt is to create a template that will get the news.
josh929
06-17-2002, 02:28 AM
just installed it, haven't tried it out yet.
just a couple suggestions (maybe for your next version, if you make one)--purely my opinion:
1) instead of the ~~~~cut~~~~ thing, make something like
*************** or ================ or ---------------
2) make it so that the hack does not even work if they have not yet deleted the install file :)
thanks for the hack! i'm gonna play around with it tonight or tomorrow:)
DancesWithLysol
06-17-2002, 03:39 AM
After a few headaches, I have concluded that I would need show.php to be able to handle PHP code in the webmaster-defined templates.
Logician - since you would be familiar with both hacks, do you think it would be possible create something similar to the news hack using web templates?
Logician
06-17-2002, 05:49 AM
Originally posted by DancesWithLysol
since you would be familiar with both hacks, do you think it would be possible create something similar to the news hack using web templates?
It's possible to compile news and post to a news page (not index.php though!) with WebTemplates Hack.
However considering the fact that you already applied Logician News Hack, you really wouldnt need WebTemplate for news. Logician News has more features for news like taking some part of the news, parsing smilies (Web Templates new release will do it too), having sticky news etc. So for news I suggest using Logician News, not Web Templates.
If you are tending to use WebTemplates, yes you can though. Just create a web query to compile data from your db and create a webtemplate to post them away. But it would be a little awkard at the moment since smilies, bbcode cant be parsed for example and you are for sure need show.php to display this page.
BTW. why to you want to combine both of them? The only reason I can think of is to apply vb access permissions to your news page and except this you wouldnt need to integrate two, would you?
DancesWithLysol
06-17-2002, 02:31 PM
BTW. why to you want to combine both of them? The only reason I can think of is to apply vb access permissions to your news page and except this you wouldnt need to integrate two, would you?
The site that I would like to use this for is a subscription site where subscribers get access to additional content (e.g. files). I was considering a system where I could show all the most recent files that the user has access to (based on the usergroupid) on the left, and have the site news on the right.
While I like your news hack, one thing I wish it would do is use the colors defined in the user's selected style. I figured that templates solve this problem and are a more general approach to accessing information from the database for use in web pages.
Logician
06-17-2002, 02:45 PM
Originally posted by DancesWithLysol
While I like your news hack, one thing I wish it would do is use the colors defined in the user's selected style. I figured that templates solve this problem and are a more general approach to accessing information from the database for use in web pages.
I see.. Unfortunately it's not possible to combine Logician News and WebTemplates. If you want to create such an enviroment you need to stick with Webtemplates. It can help you to get the page you have in your mind, just one downside: It cant parse smilies and bbcode for your news yet. However I already added this feature to the new release which will be released soon, so I guess until you finish designing your page, it will be ready and you can use it with your news.
Alan Ang
06-17-2002, 07:18 PM
hi logician...
i tried to install your hack, but got this after the installation... i am lost at what to do...
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/poolfana/public_html/forum/admin/functions.php on line 812
Fatal error: Call to undefined function: vbsetcookie() in /home/poolfana/public_html/forum/admin/sessions.php on line 183
Logician
06-17-2002, 07:30 PM
Originally posted by Alan Ang
i tried to install your hack, but got this after the installation... i am lost at what to do...
Alan please double check if you applied step 3 correctly. It seems that you made a mistake in step 3. Check it out, reapply if necessary and if you cant figure that out send me your "functions.php" via pm and I'll take a look at it.
Alan Ang
06-17-2002, 07:36 PM
PM sent to you... thx in advance. :)
GuruXL
06-17-2002, 11:47 PM
you know this hack seems kinda pointless I mean their is already a "Pages Via Templates" hack...so in my mind this hack is well...crap...
Logician
06-18-2002, 09:27 AM
Originally posted by GuruXL
you know this hack seems kinda pointless I mean their is already a "Pages Via Templates" hack...
Already?
Pages Via Templates hack released in 03-27-02 05:49 AM
WebTemplates hack released in 03-22-02 07:58 PM
Make a subtraction..
I hope your maths is better than your "great" knowledge in coding and "wisdom" in critising something you have no idea.
Alan Ang
06-28-2002, 02:32 AM
logician,
i finally got mine up and running. great hack!
it seems that i have a little problem, i can't preview the WebQuery but I can preview the WebTemplate...
what can be the cause?
also, when i run http://myURL/show.php?pg=whoareyou, the list of messages seems NOT to be the latest posts.
when i try out your PM Query, the PMs that i get are all the Odd numbered ones... ???
can i re-install the Webtemplates? will it create another extra 2 tables or will it just write over?
oh, and one last thing (sorry too many:()... how do i link my index.htm to show the http://myURL/show.php?pg=whoareyou
please advice.
thx.
Logician
06-28-2002, 07:03 AM
Originally posted by Alan Ang
it seems that i have a little problem, i can't preview the WebQuery but I can preview the WebTemplate...
what can be the cause?
what do you mean by "you cant preview webquery"? You cant access webquery screen inside your Admin CP? Can you list webquery list in Admin CP when you click modify query? Can you access your webquery when you click one in the modify query screen? Or is it just webquery doesnt work when you load a webtemplate?
Please give some more details, I didnt get it.
also, when i run http://myURL/show.php?pg=whoareyou, the list of messages seems NOT to be the latest posts.
when i try out your PM Query, the PMs that i get are all the Odd numbered ones... ??? can i re-install the Webtemplates?
Have you modified any webquery? Was it so when you first installed the hack and loaded whoareyou or did it become broken after sometime?
I must say that this is weird :)
Anyway here is my tips:
1- First apply the fix to show.php a few messages above and let's see if it will do the trick.
2- If not please delete your tables via these SQL commands:
drop table webtemplates;
drop table webtemplatequery;
(You have a tool to run a SQL query right? If not, you can use this one (https://vborg.vbsupport.ru/showthread.php?s=&threadid=38262))
After deleting both, run installation script again..
how do i link my index.htm to show the http://myURL/show.php?pg=whoareyou
Do you mean replacing your index.htm with this template or inserting the results returned from this template inside index.htm?
Or if you just mean to put the link of the template in index.htm, you should link it just like a normal internet URL:
<a href="http://myURL/show.php?pg=whoareyou">My Template</a>
BTW. can I see your webtemplate? What's the URL?
Alan Ang
06-28-2002, 12:59 PM
hi logician, thanks for your reply...
Originally posted by Logician
what do you mean by "you cant preview webquery"? You cant access webquery screen inside your Admin CP? Can you list webquery list in Admin CP when you click modify query? Can you access your webquery when you click one in the modify query screen? Or is it just webquery doesnt work when you load a webtemplate?
i can access the webquery, i can edit webquery, but i just can't preview, that's all. :)
Have you modified any webquery? Was it so when you first installed the hack and loaded whoareyou or did it become broken after sometime?
I must say that this is weird :)
after my installation, the problem already exists.
it is wierd, didn't see anyone else in here having the same problem. :(
Anyway here is my tips:
1- First apply the fix to show.php a few messages above and let's see if it will do the trick.
pardon me, i don't get you... what is the fix that you are referring to?
2- If not please delete your tables via these SQL commands:
drop table webtemplates;
drop table webtemplatequery;
(You have a tool to run a SQL query right? If not, you can use this one (https://vborg.vbsupport.ru/showthread.php?s=&threadid=38262))
After deleting both, run installation script again..
this will be my last resort.
Do you mean replacing your index.htm with this template or inserting the results returned from this template inside index.htm?
Or if you just mean to put the link of the template in index.htm, you should link it just like a normal internet URL:
<a href="http://myURL/show.php?pg=whoareyou">My Template</a>
BTW. can I see your webtemplate? What's the URL?
yes, i mean replacing the html... is it possible to embed into the html?
the webtemplate is at www.poolfanatic.com/forum/show.php?pg=whoareyou
Logician
06-30-2002, 04:33 PM
Originally posted by Alan Ang
i can access the webquery, i can edit webquery, but i just can't preview, that's all. :)
does "cant preview" mean, when you load your webtemplate, your webqueries are not displayed? However you can list/edit/insert them inside your Admin CP, right?
pardon me, i don't get you... what is the fix that you are referring to?
here:
https://vborg.vbsupport.ru/showthread.php?postid=255547#post255547
yes, i mean replacing the html... is it possible to embed into the html?
You have a few options for this:
a) You can set your .htaccess file and point index.html as /url/board/show.php?pg=yourwebtemplate and so your main page will be this webtemplate
b) You can set your main page as index.php instead of index.html and in your index.php, you can include any webtemplate you want (see here (https://vborg.vbsupport.ru/showthread.php?postid=266041#post266041) for more info)
the webtemplate is at www.poolfanatic.com/forum/show.php?pg=whoareyou
as you can guess I can see it, as I'm a guest. :) Please first apply the fix above and if it doesnt work give guests access (with [cansee] tags) to this webtemplate so that I can see it.
grb123
07-16-2002, 06:29 PM
Nice one Logician - I'm just installing this hack on a test server and I am pretty impressed so far!
One question:
How do I include a template in another template? I thought you could just create a template and then use $templatename like we do with $header and $footer but it's coming up blank instead of including the template.
futureal
07-17-2002, 05:58 AM
Man, I had just sat down to try and write something like this. Looks awesome!
I am going to install this on one of my test sites and see how it goes.
Logician
07-17-2002, 07:20 AM
Originally posted by grb123
How do I include a template in another template? I thought you could just create a template and then use $templatename like we do with $header and $footer but it's coming up blank instead of including the template.
@grb123:The hack by default lets you include only 2 templates (header and footer) inside other templates. But considering the fact that I have received this request frequently nowadays, I might include such a feature to the new release.
However I'm can not follow the reason of including webtemplates into other templates. Can you please clarify why you need this feature? I mean you can simply insert the HTML code of the other template inside the other one and what will be the point of including the code as a seperate template?
Please also clarify if you want a feature to parse webqueries in the included webtemplate or not? I mean if the included template does not have webqueries in it, it can be simplier to add such a feature but if you have webqueries then the script need to parse them too which requires more work.
@futureal & grb123: Since you are testing the hack out, maybe you would be interested to test the new version (which has not been released yet). It's fully competable with the existing one so you can use your existing webtemplates and webqueries and it has powerful new features. If you want to help me test it out to catch bugs, add new features etc., please provide me with your email address so that I can send you the file. Thx.
grb123
07-17-2002, 07:35 AM
Hi Logician
Thanks for the reply. The reason why I want to include templates is to make it easier for our site editor to update the sections he needs to update without getting lost in all the code in the rest of the page.
For example:
We have an Events page. This consists of three sections: the standard $header, a side bar which is specific to all the pages in the events section, and the list of events. At the moment the side bar and the events list are text files which are included in the page using SSI. The editor only has access to the events list which he updates as events are sent to us. This makes it easy to update as he only sees the bit that he updates.
I wanted to therefore create 3 WebTemplates: Events (main page), Events_Side (side bar) and Events_List (the list of events.) I could then tell the editor to just to to Events_List whenever he needed to update an event. If all of these are in one page, it is a lot of code in a small template box and for a non-IT person this can get very confusing.
The included template may have webqueries in it though it's not essential. Our side bars currently contain the last 10 posts from each forum depending on which page is being loaded, but I can also just not have an included side bar template if that makes it easier and instead just have two templates, Events and Events_List.
Hope that makes it clearer!
I would be more than happy to test the new version though I've only just installed this and haven't even tried the queries yet.
grb123
07-17-2002, 12:34 PM
Another useful feature would be a backup for WebTemplates only, as per the vBulletin styles. I've done it using mysqldump and just dumping the webtemplates and webtemplatequery tables, but if we had it in the control panel that would be nice. OK, I could add it myself, but you may want to include it in a future version.
I've also noticed that if you include links in the footer, you need to hardcode them ie show.php?pg=pagename rather than {template=pagename].
Is there anyway that the vbulletin search can also include searching the WebTemplates pages?
Logician
07-17-2002, 05:11 PM
Originally posted by grb123
Another useful feature would be a backup for WebTemplates only, as per the vBulletin styles. I've done it using mysqldump and just dumping the webtemplates and webtemplatequery tables, but if we had it in the control panel that would be nice. OK, I could add it myself, but you may want to include it in a future version.
Actually it is in your Admin CP: Click "Backup Database" inside vb Admin CP and choose tables webtemplates and webtemplatequery to backup your entire webtemplate/webquery data. This is one of the nice feature of the hack, you back up your vb and your entire site is backed up..
However I also added a new feature to the new version: You can export your webtemplates/webqueries as a text file. I integrated this feature so that hack users can easily share their useful webtemplates/webqueries, but it's also useful for archiving purposes (I'll send you the new version ASAP, you can test the feature)
I've also noticed that if you include links in the footer, you need to hardcode them ie show.php?pg=pagename rather than {template=pagename].
Yeah, header and footer are not designed to be parsed. Because I dont want to increase PHP script running time with all these features, however it can be achievable with one line of code if that is what you want.
Is there anyway that the vbulletin search can also include searching the WebTemplates pages?
Can be possible with hacking but would be a hard job. VB's searching design is quite complicated and you may need to commit too much time to first solve the system, then integrate this feature.
An easier method would be to create a webquery that makes searches in your webtemplates. In the new version webqueries work with ourside variables so you can design such a powerful webquery which accepts user data and searches webtemplates according to this keyword. However please notice that some of your templates may have conditionals (eg. hidden text for certain users) or may be private (open to some users only) and if you search keywords in your entire webtemplate db, these info may be exposed..
grb123
07-18-2002, 07:01 AM
Originally posted by Logician
Actually it is in your Admin CP: Click "Backup Database" inside vb Admin CP and choose tables webtemplates and webtemplatequery to backup your entire webtemplate/webquery data. This is one of the nice feature of the hack, you back up your vb and your entire site is backed up..
Ah, sorry - should have checked there! Thanks! Yes, that is also one of the reasons why your script interests me so much - at the moment I have a fairly static site but updating and backing up is a bit of a hassle. So far, WebTemplates seems to be much easier, apart from the ability to include other templates as I mentioned earlier.
Yeah, header and footer are not designed to be parsed. Because I dont want to increase PHP script running time with all these features, however it can be achievable with one line of code if that is what you want.
No, it's fine as it is thanks. I don't want anything that is unecessarily going to increase server load.
An easier method would be to create a webquery that makes searches in your webtemplates.
That's exactly what I want! But I have no idea how to create it!
Logician
07-18-2002, 10:17 AM
Originally posted by grb123
That's exactly what I want! But I have no idea how to create it!
Please consult to the help page section related "outside variables". You can use the info there. To recap:
You first need to create an HTML form (in a static HTML page or in a webtemplate, your call) and put a input text box there to let your users enter the keyword to search. Then create another webtemplate and make sure the form POSTs the form data to that second webtemplate. To that second webtemplate, attach a webquery which takes the user keyword and by using it searches the relevant field of "webtemplates" table and sorts the found results. Then by clicking the sorted results user can visit the webtemplates which has these keywords.
I again want remind you that if you have "private webtemplates" or "private sections in public webtemplates" these can be exposed unless you exclude these webtemplates in your webquery.
If you are not familiar with the tecnical concepts I mentioned here or cant manage to do your searching feature yourself, remind me your request after I released the new version and I can give you the webtemplate/webquery that does it.
@To other users of webtemplates hack: The feature (ie "outside variables") I quote in this message, is not included in the webtemplates version (beta) you are using at the moment. This feature is included in the new version of webtemplates and although it's not yet released, grb123 is beta testing it.
grb123
07-18-2002, 01:58 PM
Thanks Logician. I may have to get the search query from you as I don't trust myself! I've upgraded to the new Beta and it's all ok so far. I'll PM you some suggestions when I've played with it for a couple of days.
inetd
07-20-2002, 07:31 PM
Logician, please reply me :)
I can create main homepage with news (from first forum), poll (from second forum), login panel, information about PM and small help for newbie - By means of it hack?
grb123
07-21-2002, 09:24 AM
Originally posted by inetd
Logician, please reply me :)
I can create main homepage with news (from first forum), poll (from second forum), login panel, information about PM and small help for newbie - By means of it hack?
Yes, you could but you would probably be better off using vBHome or vBPortal which would be easier for your purposes. Do a search here to find those two hacks.
inetd
07-21-2002, 10:20 AM
How to make, that at enter on MY_FORUM_URL user saw one of web templates? And how in web template to insert contents of another web template?
inetd
07-21-2002, 10:49 AM
don't work Advanced Page Design
[[ ($user_usergroupid==6) ]] (without spaces)
I see
[[ (6==6) ]] (without spaces)
Help me, please
Logician
07-22-2002, 07:49 AM
inetd,
I can create main homepage with news (from first forum), poll (from second forum), login panel, information about PM and small help for newbie - By means of it hack?
As grb123 suggested, I think you should use other hacks if you intend to apply it to your main page. Well some of your your requests can be done via Webtemplates too, but if you are designing a "dynamic home page", you can do it more easily with other hacks.
However you can use webtemplates to design other pages (non main page) of your site with efficiency. So for example if you have a page which you want to display to only usergroup X, registered members, user with more than Y posts or user older than X days you can use webtemplates..
Originally posted by inetd
don't work Advanced Page Design
[[ ($user_usergroupid==6) ]] (without spaces)
I see
[[ (6==6) ]] (without spaces)
Help me, please
Your syntax is wrong.. You should use this format:
[[($user_usergroupid==6)]]
I see
[[/($user_usergroupid==6)]]
This conditional will show the text "I see" only if the page visitor is from Site Admins group. I guess this is what you wanted to achieve..
And how in web template to insert contents of another web template?
Please read a few messages above for more info about this subject..
inetd
07-23-2002, 01:52 AM
Logician, i see vBindex, vbHome(Lite) and vbPortal. But i don't want make many changes in my vB :)
Please read a few messages above for more info about this subject.. You can quote these messages? Please :)
And say please, how to make, that at enter on MY_FORUM_URL user saw one of web templates?
Logician
07-23-2002, 07:15 AM
Originally posted by inetd
Logician, i see vBindex, vbHome(Lite) and vbPortal. But i don't want make many changes in my vB :)
You can quote these messages? Please :)
here you go: https://vborg.vbsupport.ru/showthread.php?postid=273481#post273481
And say please, how to make, that at enter on MY_FORUM_URL user saw one of web templates?
You have 2 options to make a webtemplate your main page:
1- 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/show.php?pg=your_template
Please search keywords ".htaccess+redirect" for more info about .htaccess redirection
2- You can assign your homepage as "index.php" instead of index.html (this can require .htaccess editing either), then inside this file you can "include" your webtemplate. So whenever index.php is called, your webtemplate will be displayed.
To include your webtemplate inside your index.php you need to use this line in the begining of index.php:
<?php include ("http://www.yourdomain.com/forum/show.php?pg=your_template"); ?>
Choose either way and you can make your webtemplate your site's main page..
However I want to mention again that, this hack is not meant to be "site main page" alternative..
freeshares1
07-23-2002, 11:45 AM
Logician,
Thanks for this great hack. It has given me so many idea's.
It is working on www.gamblingforums.net (except i cannot get my referrals working)
inetd
07-23-2002, 03:49 PM
Logician, you the best vBhacker! Sorry for my bad English also there can be a dullness, I am simple very badly I understand in mySQL and PHP. Thank you huge!
inetd
07-23-2002, 04:01 PM
Originally posted by Logician
inetd,
don't work Advanced Page Design
[[ ($user_usergroupid==6) ]] (without spaces)
I see
[[ (6==6) ]] (without spaces)
Help me, please
Your syntax is wrong.. You should use this format:
[[($user_usergroupid==6)]]
I see
[[/($user_usergroupid==6)]]
This conditional will show the text "I see" only if the page visitor is from Site Admins group. I guess this is what you wanted to achieve..
Please read a few messages above for more info about this subject.. Logician, i use your code in header webtemplate and don't work. Result: [[(6==6)]]I see[[/(6==6)]] And templatequeryon in header also don't work. Result in page: templatequeryon
Help me please.
Logician
07-23-2002, 05:50 PM
Originally posted by inetd
i use your code in header webtemplate and don't work. Result: [[(6==6)]]I see[[/(6==6)]] And templatequeryon in header also don't work. Result in page: templatequeryon
inetd, yes you can NOT use conditionals or webqueries inside header and footer templates. You need to add them to your original webtemplates. Header and footer are designed to be added inside other webtemplates only..
BTW you were asking if you can assign a webtemplate as your site's main page: It seems that freeshares1 did it successfully. ;) Have you checked his site's main page (http://www.gamblingforums.net), it's a webtemplate?.. (FYI he used the redirection method in .htaccess file)
inetd
07-23-2002, 11:51 PM
Other trouble :( :)
In custom webtemplate i use
[[($user_usergroupid==2 OR $user_usergroupid==5 OR $user_usergroupid==6 OR $user_usergroupid==7)]]I see[[/($user_usergroupid==2 OR $user_usergroupid==5 OR $user_usergroupid==6 OR $user_usergroupid==7)]]But nothing I see..
inetd
07-24-2002, 12:15 AM
I can use vb templates in WEBTEMPLATES?
Logician
07-24-2002, 05:45 AM
Originally posted by inetd
Other trouble :( :)
In custom webtemplate i use
[[($user_usergroupid==2 OR $user_usergroupid==5 OR $user_usergroupid==6 OR $user_usergroupid==7)]]I see[[/($user_usergroupid==2 OR $user_usergroupid==5 OR $user_usergroupid==6 OR $user_usergroupid==7)]]But nothing I see..
make sure you visit your webtemplate after you logged in from a usergroup id 2, 5, 6 or 7. I checked your conditional in a sample webtemplate here and it works for me..
I can use vb templates in WEBTEMPLATES?
Basically no.. displaying vb templates is not a problem: just copy paste their source code inside a webtemplate and you can display them. However most of the vbtemplates have variables which are formed on the fly inside vb code so it's not possible to process them when they are moved inside a webtemplate. Therefore it depends: For example you can display register page template, while you cant display forumhome or postbit template..
inetd
07-24-2002, 04:46 PM
Originally posted by Logician
make sure you visit your webtemplate after you logged in from a usergroup id 2, 5, 6 or 7. I checked your conditional in a sample webtemplate here and it works for me..
hm. Yes, i logged in if admin. I'm use WEBTEMPLATES 1.0.
I can use vb templates in WEBTEMPLATES?
Basically no.. displaying vb templates is not a problem: just copy paste their source code inside a webtemplate and you can display them. However most of the vbtemplates have variables which are formed on the fly inside vb code so it's not possible to process them when they are moved inside a webtemplate. Therefore it depends: For example you can display register page template, while you cant display forumhome or postbit template.. I'm want use $getnewpost[posts], $newpm[messages], $unreadpm[messages], $allpm[messages] in WEBTEMPLATES. How i can make this?
inetd
07-24-2002, 06:30 PM
Logician, i create file test.php with contents:
<? include("http://boltalka.com.ua/show.php?pg=footer");?>
<? include("show.php?pg=header");?>
When i open test.php in browser i see blank page. Help me, please.
Logician
07-25-2002, 09:41 AM
Originally posted by inetd
hm. Yes, i logged in if admin. I'm use WEBTEMPLATES 1.0.
ok then, plz send your webtemplate via PM or email and let me take a look at it..
I'm want use $getnewpost[posts], $newpm[messages], $unreadpm[messages], $allpm[messages] in WEBTEMPLATES. How i can make this?
Sorry you cant use these variables in your webtemplates. They are vb variables and formed dynamically inside vb scripts so they cant be moved to webtemplates easily. However if what you are trying to do is to get/display user's PM count/read/unread PM numbers etc., you can create custom webqueries for these. (Please get the basics of SQL to form these queries)
When i open test.php in browser i see blank page. Help me, please.
I see.. This is related to your server settings I guess. Although I dont use this structure in my site, I know Wildthinks uses it in his site with success. However it may not work for you. So if you are trying to make a webtemplate your main page, try .htaccess method. It will work..
inetd
07-25-2002, 05:10 PM
Logician, i'm use php include in other project and will work fine. and i'm use include, but not webtemplates, and works fine too...
grb123
07-29-2002, 06:04 PM
Webqueries query:
I currently have the last 10 thread titles from my forum on a page. I have the query as follows:
SELECT threadid, title, FROM thread WHERE visible='1' AND forumid='1' ORDER BY title LIMIT 10
which shows the last 10 threads. How can I make the threadtitle no more than 28 characters?
DrkFusion
07-29-2002, 06:35 PM
I do not understand the concept of using php...I want to use php includes, how would I do it? I read the webtempaltes help, but I do not under stand php operator...please help.
Drk
DrkFusion
07-29-2002, 08:08 PM
Sorry, I tried all compinations of those php operators thing, please some help thanks.
Drk
Logician
07-29-2002, 08:32 PM
Originally posted by grb123
Webqueries query:
I currently have the last 10 thread titles from my forum on a page. I have the query as follows:
SELECT threadid, title, FROM thread WHERE visible='1' AND forumid='1' ORDER BY title LIMIT 10
which shows the last 10 threads. How can I make the threadtitle no more than 28 characters?
You can use this query:
SELECT threadid, left(title,28) as title1 FROM thread WHERE visible='1' AND forumid='1' ORDER BY title LIMIT 10
Dont forget to use ??title1?? in your tablerow
Logician
07-29-2002, 08:33 PM
Originally posted by DrkFusion
I do not understand the concept of using php...I want to use php includes, how would I do it? I read the webtempaltes help, but I do not under stand php operator...please help.
Drk
DrkFusion please give some details about what you are trying to achieve. I have no idea what kind of webtemplate/webquery you are trying to design.
inetd
07-29-2002, 08:36 PM
Logician, help me with include webtemplates in php file.
DrkFusion
07-29-2002, 08:58 PM
I m desiging my main page, and this has a php inlude, that pulls news from my forums
<?php include ("news.php"); ?>
Somethign like that, but webtemplates is displaying it.
Drk
Logician
07-29-2002, 10:19 PM
Originally posted by DrkFusion
I m desiging my main page, and this has a php inlude, that pulls news from my forums
May I suggest using this hack (https://vborg.vbsupport.ru/showthread.php?s=&threadid=39278) in your main page to pull news instead of webtemplates?
I appreciate your interest in webtemplates hack but as I mentioned a few times before, webtemplates hack is not intended to be "main page" alternative. Yes there are some ways to use it as your site's main page (see above) and yes some users use it in their main pages in different ways but I just dont recommend such a practise although it may be possible. Webtemplates are ideal for ALL your non-vb pages provided that it is not site's main page.
And the hack does not coded to parse PHP includes either, sorry..
@inetd: Pal, my message addresses you too. If you cant make your webtemplate your site's main page, sorry, just give up or try using .htaccess method. If you have another problem, please tell me and lets see if I can help you. However I really have a hard time understanding your English. :)
inetd
07-29-2002, 10:24 PM
Logician, my english = lol :) :D
I'm include not webtemplates and all work! But include do not work with Webtemplates 1.0. Please check this.
Logician
07-29-2002, 10:35 PM
Originally posted by inetd
Logician, my english = lol :) :D
I'm include not webtemplates and all work! But include do not work with Webtemplates 1.0. Please check this.
sorry I really cant understand you. What are you trying to include? :rolleyes:
1- If you are trying to include webtemplates inside other webtemplates, this wont work except for header and footer webtemplates.
2- If you are trying to include PHP inside webtemplate, this wont work either.
3- If you are trying to include a webtemplate inside an independent PHP file, this may or may not work according to your server settings as I mentioned before. For example I know that Wildthinks uses this method in his web page (http://www.swishzone.com) but the very same line he used might not work in other users' web pages. Related to server config..
If not either of them, what are you trying to include?
inetd
07-29-2002, 10:41 PM
Logician, may be his trouble only in Webtemplates 1.0. I use include on the site and all works normally. But at attempt to insert in php webtemplates, nothing it turns out.
jbear6
07-30-2002, 05:43 PM
Very nice, and VERY Powerful! I installed this on my test forum, and installation was a breeze. Even a novice can install this. I am just starting to "play" with this, but it looks incredible.
Thanks for all the time you spent,
Jbear
grb123
07-30-2002, 06:37 PM
Originally posted by Logician
You can use this query:
SELECT threadid, left(title,28) as title1 FROM thread WHERE visible='1' AND forumid='1' ORDER BY title LIMIT 10
Dont forget to use ??title1?? in your tablerow
I tried that but all that appears for each thread title is "_" (which is linked to the thread). The title itself doesn't appear.
If I change "left(title,28)" in the query above to just "title", the thread titles appear (but obviously not only the first 28 characters).
Logician
07-30-2002, 06:58 PM
@grb123: Can you post your query and tablerow here? let me check what the problem is.. (Also which version are u using?)
@jbear6: thx for the nice comments :)
grb123
07-30-2002, 07:12 PM
Hi Logician
I have the following in my query (using the new, unreleased version of Webtemplates)
Query:
SELECT threadid, left(title,18), forumid, postusername, dateline FROM thread WHERE forumid='28' ORDER BY dateline DESC LIMIT 10
Table:
<tr><td class="leftboxcontent"><a href="$bburl/showthread.php?s=&threadid=??threadid??">??title??</a></td><tr>
The result:
Logician - Love the hack! Thanks to the patient help of DrkFusion - the hack is installed and working smoothly, and I even have a slight concept of how to use it! ;)
Please take a look at www.thesistersthree.com/site ALL my pages are webtemplates. I know you said not to use a lot of them, but is there a limit? So far it seems really helpful. I don't have a lot of the site finished, but if you check the gallery section, you will see a bunch of different templates in use (for every link there's a template).
If using this many is okay, is there a way to organize them in the admin cp similiar to the template section? For instance - I'd like all the gallery webtemplates to be in one section, spells in another, etc etc.
Also, I'd be interested in allowing more than two webtemplates to be called if you are considering releasing it. :)
Logician
07-30-2002, 08:38 PM
Originally posted by grb123
I have the following in my query
@grb123: It's your query design that has the problem:
Try to follow my suggestion in my previous message. Like this:
Query:
SELECT threadid, left(title,18) as title1, forumid, postusername, dateline FROM thread WHERE forumid='28' ORDER BY dateline DESC LIMIT 10
Tablerow:
<tr><td class="leftboxcontent"><a href="$bburl/showthread.php?s=&threadid=??threadid??">??title1??</a></td><tr>
See the difference? ;)
@Rose: Need to go offline now, I'll answer you ASAP..
grb123
07-30-2002, 09:11 PM
Originally posted by Logician
@grb123: It's your query design that has the problem:
Try to follow my suggestion in my previous message. Like this:
Query:
SELECT threadid, left(title,18) as title1, forumid, postusername, dateline FROM thread WHERE forumid='28' ORDER BY dateline DESC LIMIT 10
Tablerow:
<tr><td class="leftboxcontent"><a href="$bburl/showthread.php?s=&threadid=??threadid??">??title1??</a></td><tr>
See the difference? ;)
Ah excellent- works perfectly! Thanks very much!
Logician
07-31-2002, 08:00 AM
Originally posted by Rose
Please take a look at www.thesistersthree.com/site ALL my pages are webtemplates.
I must admit that I'm impressed.. I have seen many sites fully powered with webtemplates, but your site also designed nicely..Who ever did it, congrats, nice job :)
I know you said not to use a lot of them, but is there a limit? So far it seems really helpful. I don't have a lot of the site finished, but if you check the gallery section, you will see a bunch of different templates in use (for every link there's a template).
There is no limit. You can use as many as you like.
If using this many is okay, is there a way to organize them in the admin cp similiar to the template section?
Sorry.. To achieve this I need to modify existing webtemplate table and this would cause incompetability with the existing version so I dont plan to do it. My suggestion maybe to use similiar names for similiar webtemplates. For example if you name them:
Gallery1_templatexxx
Gallery1_templateyyy
Gallery1_templatezzz
all gallery1 templates will be listed newt to each other and you can track tham easily
Also, I'd be interested in allowing more than two webtemplates to be called if you are considering releasing it. :)
There is a high demand for this feature but it really effects hack's performance badly by slowing the parsing and increasing loading time. So I cant promise for that feature.. Let's see what will happen in the next release.. :)
Aerith_Freak
07-31-2002, 10:12 AM
This will probably sound like the stupidest question ever. But if I use WebTemplates do I HAVE to use my forum stylesets as my layout in the WebTemplates?
I mean instead of the layout showing according to the styleset the user has selected is it possible to code it so the whole site appears as a specific styleset that is the same for all users, but that styleset is not accessible through the user cp.
I like the premise of this hack, but I don't quite fancy my forums styleset as the layout for my entire site.
Logician
07-31-2002, 10:48 AM
Originally posted by Aerith_Freak
This will probably sound like the stupidest question ever. But if I use WebTemplates do I HAVE to use my forum stylesets as my layout in the WebTemplates?
Sure it's not mandatory. Using user styles in your webtemplates is a feature the hack gives you in case you want to use it. It's all upto you..
The system works like this: Webtemplates are basically HTML pages so they display the HTML source (together with vb variables if you choose to) when they are loaded. Simply put the source of any HTML page into a webtemplate and this webtemplate will display it in the design of the page. So if you dont use vb style sheet elements in your source code, they wont be displayed and your webtemplate will have a permenant style, just like a static HTML page.
I hope this helps you to understand the logic..
Aerith_Freak
07-31-2002, 10:56 AM
Ah yes I get your drift now.
Originally posted by Logician
I must admit that I'm impressed.. I have seen many sites fully powered with webtemplates, but your site also designed nicely..Who ever did it, congrats, nice job :)
:$ Thanks. It's my first attempt. Glad to see I'm doing somethign right. *hehe*
There is no limit. You can use as many as you like.
Sorry.. To achieve this I need to modify existing webtemplate table and this would cause incompetability with the existing version so I dont plan to do it. My suggestion maybe to use similiar names for similiar webtemplates. For example if you name them:
Gallery1_templatexxx
Gallery1_templateyyy
Gallery1_templatezzz
all gallery1 templates will be listed newt to each other and you can track tham easily
*nods* This is what I figured. I'm naming the templates rather nicely so it's not too hard to find them (such as what you have listed above). Just thought I'd try. ;)
There is a high demand for this feature but it really effects hack's performance badly by slowing the parsing and increasing loading time. So I cant promise for that feature.. Let's see what will happen in the next release.. :)
Ah, if you do you do and if not I'm sure we'll survive. :)
Tim Wheatley
08-07-2002, 03:19 AM
Hm I've just read every post and I've decided to have a go at this. I've been running cgi/shtml on my website because I used to use UBB and found perl easy to understand. I feel 'sort of' okay with sql now and I'm going to give this a go.
Thanks for the hack and for the opportunity to do this, I'll let you know how it goes...
Tim Wheatley
08-07-2002, 03:23 AM
I have one question for anyone really...
How do you move a template into a template category or create a category.
I have a lot of templates called forumhome_xxxxxxxx and I'm like to move them for sorting out into the forum homepage display category... I've had it done before by a file I downloaded doing it automatically with a template - but how do I do it manually? Sql table editing?
Logician
08-21-2002, 07:25 AM
Originally posted by Tim Wheatley
How do you move a template into a template category or create a category.
Do you mean webtemplates created with this hack or default vb templates?
FASherman
08-22-2002, 11:26 PM
Just installed this hack. Went to view the help pages and got:
"The page you requested does not exist!
Please check the address you want to visit. If you arrived this page by clicking a link inside this site, you may notify the Site Administrator about the broken link. Thank you!"
Clearly I did something wrong. Any idea?
FASherman
08-23-2002, 12:52 AM
Nevermind. The installdoc gave the help pages as starting with a cap. The engineer in my always wants to read docs for diving in.
Nice work. You've designed a single parsing engine to resolve a stored procedure language to the refrecned data and to recognize and substitute for vb variables. If you ever need a new name for this, try vbWarmFusion.
Logician
08-23-2002, 07:56 AM
Originally posted by FASherman
Nice work. You've designed a single parsing engine to resolve a stored procedure language to the refrecned data and to recognize and substitute for vb variables. If you ever need a new name for this, try vbWarmFusion.
You are right..
If I would recoded it today, I would name it something like vbCodingLanguage or smt. because it is really a kind of simple vb coding languge. I didnt realize the fact in the day I named the hack :)
Anyway new version is much powerful regarding this feature of the hack and I'm coding it mostly around this point. It will be possible to write independent vb structures/applications with this hack without even changing a single line of vb code or writing an independent .php script, all within webtemplates and webqueries.
Too bad many users of the hack havent ever realized this most powerful feature of the hack and they only use it as a basic vb-membership check for non-vb pages..
FASherman
08-23-2002, 06:22 PM
I easily see the benefit of being able to present a page with dynamic, up-to-the-minute data, mining the DB for personalization characteristics.
Now, I've only begun to tinker, but it seems like the $user[fieldname] replacement doesn't work in my webtemplates. Making the rational assumption that I have done something wrong, any idea what it might be?
Logician
08-23-2002, 06:31 PM
Originally posted by FASherman
Now, I've only begun to tinker, but it seems like the $user[fieldname] replacement doesn't work in my webtemplates. Making the rational assumption that I have done something wrong, any idea what it might be?
yes your variable name is wrong. Try $bbuserinfo[fieldname] instead. ;)
FASherman
08-23-2002, 07:28 PM
Thanks, that did it. Is there a comprehensive list of variables somewhere? Sure would help!
Here's how one instance in how I use this to give others an idea. I use it in my privacy statement. I show users what information we have collected, then explain what other users can see based on various setting like invisibility and such. Then they have a clear idea who can see what information, who can PM them or email them.
Basically it is a privacy statement tailored to the individual user and one that will change as they change their settings to either gain more privacy or more visibility to the on-line community.
How's that for a good use of this utility (not really a hack)?
ryancooper
08-23-2002, 08:37 PM
I get a error when I try to do anything with the show.php
atal error: Call to undefined function: logiciangettemplate() in /home/talkdis/public_html/forums/show.php on line 25
What am i missing?
Logician
08-23-2002, 09:30 PM
Originally posted by ryancooper
I get a error when I try to do anything with the show.php
atal error: Call to undefined function: logiciangettemplate() in /home/talkdis/public_html/forums/show.php on line 25
What am i missing?
You probably applied instruction step 3 incorrectly. Have you added the code to your admin/functions.php? (and have you uploaded it to your server?) ;)
Logician
08-23-2002, 09:34 PM
Originally posted by FASherman
Thanks, that did it. Is there a comprehensive list of variables somewhere? Sure would help!
I dont know a list but it's not hard to compile one by yourself for $bbuserinfo variables. Just check database table "user" via PHPmyAdmin or any other db tool and note field names in user table. These are exactly same in $bbuserinfo[fieldname]
FASherman
08-23-2002, 11:13 PM
That was more in reference to the other $bb variables. I've noticed that more than just the $bbuser variables get parsed and replaced.
irn-bru
08-26-2002, 10:49 AM
did I reply to say this is a great hack? cant remember
well anyway it is..
Limpkinw
08-26-2002, 07:21 PM
When i click the link on webtemplates_install.php i just get
http://www.limpkinw.com/webtemplates_install.php?p=1
and it keeps kicking me back to that.
Any suggestions?
Limpkinw
08-26-2002, 07:42 PM
Ok I was able to get around the problem above by modifying the php file a bit but on step 4 i get this...
Inserting the default templates to the table and finishing the installation..
Notice: Undefined variable: pagetitle in D:\Inetpub\wwwroot\www.limpkinw.com\forum\webtempl ates_install.php on line 309
Congratulations! The relevant tables are created and default templates are installed successfully.
Before proceeding with hack installation, please DO NOT FORGET to DELETE this file (webtemplates_install.php) from your server!
that line is
<head><title>$pagetitle</title>
surrounded by
$template=addslashes($template);
mysql_query ("insert into webtemplates (templateid, title, template, count) values (null, '$title', '$template', '0')");
echo mysql_error();
//////////////////////////////////////////////////////////////////////////////////////////////// notfound
$title = "notfound";
$template=<<<HASH51
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><title>$pagetitle</title>
\$headinclude
\$headinsert
</head>
Any suggestions? Thanks!
Logician
08-28-2002, 08:34 AM
Originally posted by Limpkinw
Notice: Undefined variable: pagetitle in D:\Inetpub\wwwroot\www.limpkinw.com\forum\webtempl ates_install.php on line 309
that line is
<head><title>$pagetitle</title>
Change the line as:
<head><title>\$pagetitle</title>
then you should be fine.. If you are going to run the installation script from the begining I suggest deleting tables "webtemplates" and "webtemplatequery" first, then run the script. Or another chice will be inserting the "notfound" webtemplate manually via Admin CP/Add Webtemplate
Grendel
09-03-2002, 07:23 AM
Great hack, works fine here: www.short-stories.de
Thats exactly what I was looking for for my starting page - I have a literature-page and wanted to show the newest story of each forum. Further feedback from me as soon as I installed lot of queries :D
Grendel
09-03-2002, 08:55 AM
Oh, btw, in your instructions:
... please call {YOUR FORUM URL}/show.php?pg=Webtemplatehelp and {YOUR FORUM URL}/show.php?pg=Webqueryhelp files ...Should be
... please call {YOUR FORUM URL}/show.php?pg=webtemplate_help and {YOUR FORUM URL}/show.php?pg=webquery_help files ...
Logician
09-03-2002, 12:17 PM
Originally posted by Grendel
Great hack, works fine here: www.short-stories.de
Thats exactly what I was looking for for my starting page - I have a literature-page and wanted to show the newest story of each forum. Further feedback from me as soon as I installed lot of queries :D
Thank you and congrats on nice webtemplate design,
I liked it.. :)
Since you are using this webtemplate in your main page, maybe you can help out other users who are trying to apply this hack to their main pages. I assume you made a redirection in .htaccess file but a step by step installation would be very helpful to other hack users.. Thanks in advance..
Grendel
09-04-2002, 10:59 AM
Since you are using this webtemplate in your main page, maybe you can help out other users who are trying to apply this hack to their main pages. I assume you made a redirection in .htaccess file but a step by step installation would be very helpful to other hack users
Ok, here we go:
You write this code (see attachment) into your index.php (change YOURDOMAIN.COM etc. to your needs).
This will redirect all users calling http://YOURDOMAIN.COM to your starting webtemplate.
Have fun ;)
Obi-Wan
09-08-2002, 05:41 PM
great stuff there m8.
*clicks install*
Grendel
09-10-2002, 02:14 PM
There is already a given privateevent-query, but it shows all private events. What do I have to do, if only private events in the future should be listed?
(Sorry, but at the end of the day my english gets really poor)
Logician
09-11-2002, 07:02 AM
Originally posted by Grendel
There is already a given privateevent-query, but it shows all private events. What do I have to do, if only private events in the future should be listed?
This version (beta) of hack is not very good with queries that includes dates in it. However I added this feature to the new release (which I'm still coding) so you will be able to create a webquery for this with that version..
Grendel
09-11-2002, 04:59 PM
Great. Do you want to release the new version before or after vB 3?
Logician
09-12-2002, 04:47 PM
Originally posted by Grendel
Great. Do you want to release the new version before or after vB 3?
My hack works apart from vb coding, has its own db tables etc. so it's not related to the coding of vbulletin. Therefore I am not trying wait vb 3 for the new release. In fact it should already have been released, I never thought it would take so much time to release it, but I'm really too busy nowadays so cant take time to code it. Besides I always want to add new features to this new version so it never finishes.. Sorry.. :)
Kevin104
09-16-2002, 02:04 PM
This is greatest hack ever!
marocnl
10-03-2002, 10:31 AM
I would like to apologize for the following sentence.
This is a great f|u|c|k|i|n' HACK!!!!!!!!!!!!!!! Sorry for the stripes, Mods en Adms :D:D
Crinos
10-18-2002, 06:30 PM
Alright Logician, I decided to give this hack a try, since I like the theory behind it and it might prove to be the easiest way to manage a site.
However, I am still a little confused as to its usage (forgive me if the answer was somewhere in this thread - I didn't want to hunt for a needle in a stack of needles). I mean, there are instructions on how to create webtemplates, but no clear instructions on how to actually use it in relation to the site.
Let's say for example that I have an "About Us" page in .SHTML format found in my root directory ... I want to convert it to .PHP using the webtemplates hack. This is the same procedure I want for all my pages in all other folders outside the forums directory.
So do I cut and paste the entire HTML code of the About Us page into the Webtemplate form and save it as "About_Us"? If so, this would give it the path of www.mysite.com/forums/show.php?pg=About_Us", right? So does this mean that all pages created with Webtemplates will have the "/forums/show.php?pg=" path?
Or am I getting this all wrong - is Webtemplates something you use as an include into your pages? I doubt it, of course, but you never know...
Also, I tried the above procedure and called up my page on the browser. It seems that when I put $header and $footer, it calls up the "default" style of the forums .... I have 5 different potential styles on my forums - how do I automatically make it so that whatever style the user has will be reflected in the webtemplates?
Okay, I'm beginning to confuse myself here, lol ... anyway, I installed it fine and there are no problems whatsoever - I just need to know how to actually use it, y'know... Maybe that is why a few people are not willing to click on the install button for it - coz it is unclear to them on how to actually use this hack.
Give me a step-by-step example on how to do this on a sample page. I am sure this hack is being underestimated because its usage is not as clear as day :)
Thanks in advance!
Logician
10-18-2002, 07:14 PM
Originally posted by Crinos
So do I cut and paste the entire HTML code of the About Us page into the Webtemplate form and save it as "About_Us"? If so, this would give it the path of www.mysite.com/forums/show.php?pg=About_Us", right? So does this mean that all pages created with Webtemplates will have the "/forums/show.php?pg=" path?
Yes that's true: You copy paste the HTML code of your web page into a "webtemplate" by choosing "Add a New Webtemplate" and you also give it a name like "aboutus" (no spaces can exist in the name btw).
Then all you have to do is to visit this page:
yourboardurl/show.php?pg=aboutus
The webtemplate will be displayed just like you call the address:
yoursiteurl/aboutus.shtml
As far as your page content is plain HTML (that is no php/asp etc. codes in it), you can use it with all of your site pages.
Also, I tried the above procedure and called up my page on the browser. It seems that when I put $header and $footer, it calls up the "default" style of the forums .... I have 5 different potential styles on my forums - how do I automatically make it so that whatever style the user has will be reflected in the webtemplates?
If you want to apply a mandatory style to your webtemplate, you dont need the style itself, just use HTML commands. For example you have a style with greenbackground and you want to use that style in one of your webtemplates, just make your background green with plain HTML. :)
The style feature of the webtemplates apply when you want a webtemplate be displayed differently to different users according to user's style choices (ie. not mandatory by you). For example if you have 2 different styles where your users can choose with 1 red background and the other green, you may want to display the webtemplates accordingly. Its background will be red to red style users and green to greenstyle users etc. To achieve this goal, you have to use "vbulletin style codes" in your webtemplate and then that webtemplate will inherit your forum's style according to user's choices.
For a sample code check the sample webtemplates like "whoareyou", you'll notice how backgrounds, fonts etc. are assigned. It's the same method you use in your ordinary vb templates. Actually webtemplates are just like ordinary vb templates. ;)
Maybe that is why a few people are not willing to click on the install button for it - coz it is unclear to them on how to actually use this hack.
Well you may be right. But I really worked hard to give proper instructions and help files. However please notice that this hack is an advanced hack and you may really write a thick instructions about what you can do with it, if you intended to.
And again most of its features are just related to vbulletin itself. So for example the style usage is just like vb. style usage, nothing different. You paid for vbulletin itself, but IMO even they dont provide that much instructions for usage, do they? Considering the facts that webtemplates is free, I try to give endless support here with no commercial intentions and its just one of my 25 other hacks which I also try to give support, these help documents are really the best I can do now.. ;)
If these are not really helpful, well sorry about that..
Crinos
10-18-2002, 08:41 PM
Thanks for the detailed explanation Logician :)
I just wanted to make sure that I will be using your hack correctly, and that it will make site maintenance much easier as it's advertised to do. Your explanation just clinched it - I definitely need this hack and I think it's one of the most useful "functional" hacks out there. I even think it's better than the much hyped store hack (no offense Lesane, hehe), but then again, that's just me.
I like the idea of conditionals - it's an important cornerstone to value exchange and user personalization. It is with this thought that I also installed your Dynamic Announcements hack. I like the idea behind it, and I hope your future hacks always have this in mind.
And I do appreciate the support and documentation - I only nitpick at the best people :p
grb123
10-19-2002, 06:48 AM
I can verify that this hack is absolutely brilliant! Content management is now so easy, I have someone updating the site who has almost no HTML knowledge. They can even create new pages. They couldn't do this before because all the pages were .shtml and it was far more complicated.
The only thing I'm looking for now is the search to be integrated with vb's search (hint , hint :) )
THANKS LOGICIAN!!
zonegray
10-19-2002, 12:22 PM
Can WebTemplates and WebQueries be used in other pages besides show.php?
Logician
10-20-2002, 06:59 PM
Originally posted by zonegray
Can WebTemplates and WebQueries be used in other pages besides show.php?
I'm not sure if I understand your question correctly?
Webtemplates are like html pages (in fact they are so, but they just reside in your MYSQL db, just like vb templates). When you load an html page, you call its address and for webtemplates they address are :
yourboard/show.php?pg=WEBTEMPLATE_NAME
To load a webtemplate you have to call its address in this format. If you are asking if you can call a webtemplate without using "show.php", the answer is no because show.php is the script that parses and displays webtemplates. Webtemplates can not be displayed without show.php because they reside in MYSQL and you can't directly access them.
However it's always possible to use .htaccess tricks and redirect another URL to a webtemplate.
Is this what you asked?
zonegray
10-20-2002, 08:30 PM
show.php is the script that parses and displays webtemplates
Ahh, that's what I was after. Mostly thinking of the queries, wondering if there's an easy way to use them in regular vB pages. Would have been too good to be true.
Wildthinks
10-26-2002, 07:29 PM
Hi Logician,
seems the same problem as in dynamic forun announcement...
This dont work:
W E B T E M P L A T E
WEBTEMPLATE NAME :
--------------------
test
TEMPLATE:
------------ template cut start ------------------------------------------
templatequeryon
[[($bbuserinfo[styleid]==1)]]
das ost 1
[[/($bbuserinfo[styleid]==1)]]
[[($bbuserinfo[styleid]==12)]]
Das ist 12
[[/($bbuserinfo[styleid]==12)]]
------------ template cut end ------------------------------------------
WEB QUERIES IN THIS WEBTEMPLATE
--------------------
No Webqueries exist in this webtemplate
================================================== ==============================
SHARE YOUR USEFUL WEBTEMPLATE AND WEBQUERY SAMPLES IN VBULLETIN.ORG HERE:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=36578
You can attach the text file to your message to easily share them. Thank you!
================================================== ==============================
~~~~ Powered by Logician WebTemplates & WebQueries Hack \=^)) ~~~~
Your account is still active.... :p
THX for your help
Reminder: I use the beta :o
LOD-squa
11-04-2002, 06:20 PM
so does this work inside the vbulletin also?
i was going to wait for the new version, seems real good.
and announcement date yet? its been a little while.
Logician
11-11-2002, 04:35 PM
Originally posted by cono
i was going to wait for the new version, seems real good.
and announcement date yet? its been a little while.
Yes I was working on the new release hard and actually was very close to completion. I have added many new features to the new release too. But then I decided that all the new features of the new release is not very performance-friendly for servers with high trafic.
Instead of giving up the many of the new features, I decided that it would be better to change the entire algorithm of the hack to support all these new features while having a fast performance in all servers. Therefore new release is now pending in my to-do list for a revise in its algorithm&structure and since it's not easy to make an algorithm change, unfortunately I dont have a ETA for the new release.
ryancooper
11-26-2002, 09:51 PM
Quick Question. to anyone using Vbportal how do you get the left side to appear in your WEBTEMPLATES
`
Crinos
11-26-2002, 11:04 PM
use $themeheader and $themefooter instead of $header and $footer...
If you meant the sidemenus and sideboxes, I don't think it's possible as it's a phpnuke feature rather than vbulletin's, and therefore incompatible with the webtemplate hack...
ryancooper
11-26-2002, 11:14 PM
Originally posted by Crinos
use $themeheader and $themefooter instead of $header and $footer...
If you meant the sidemenus and sideboxes, I don't think it's possible as it's a phpnuke feature rather than vbulletin's, and therefore incompatible with the webtemplate hack...
Thank you very much for your quick reply. And yes i did mean the side boxes so I guess i can stop pulling my hair out trying to do it!
Thanks again. . .
luvjeffrey
11-27-2002, 05:32 PM
First and foremost, I want to thank logician for such wonderful hack.
This hack is very versatile and can be used to fit many of the design problems I have for my site.
I had been also contemplating whether to try out vbPortal but was reluctant as it involves too much changes and i am afraid will pose upgrade problems in future.
With this hack, I can safely and easily manipulate databases and also more importantly produce dynamic pages that tailor to the users needs.
Once again, I like to give a pat on logician's back. I hope to see your new release soon. Thankz :)
Eladesor
11-27-2002, 06:43 PM
Ive reada this thread and can only find reference to one person who 'fixed' this error but sadly didn't post how :(
Anyway - when installing my page remains at webtemplates_install.php?p=1
I've checked the instructions / changed the database details ect... (even put the wrong details in to see if anything changed) - but the page never changes ?
Any ideas please - Thanks in advance.
Logician
11-27-2002, 07:06 PM
Originally posted by Eladesor
Ive reada this thread and can only find reference to one person who 'fixed' this error but sadly didn't post how :(
Anyway - when installing my page remains at webtemplates_install.php?p=1
I've checked the instructions / changed the database details ect... (even put the wrong details in to see if anything changed) - but the page never changes ?
Sorry my bad.. I should have updated the installation file for this small bug which occurs in some servers. Here is the fix:
edit "webtemplates_install.php", find:
settype ($p, "integer");
Before that add:
$p=$HTTP_GET_VARS['p'];
This should fix the bug in installation.. Let me know if it doesn't work, thx..
Eladesor
11-27-2002, 07:12 PM
Logician: No worries - it happens ;)
Thanks for the fix - edited the file and everything worked perfect :)
Now it's time to play :)
ryancooper
11-28-2002, 03:08 PM
Is there a way to call a php include in the file? I tried
<?php
include 'file.html'
?>
But nothing shwed up
Logician
11-28-2002, 05:18 PM
Originally posted by ryancooper
Is there a way to call a php include in the file? I tried
<?php
include 'file.html'
?>
But nothing shwed up
Webtemplates are not parsed for PHP.
Ember
01-02-2003, 08:07 PM
This may have been covered before, but I am using $user_username like this:
Welcome $user_username
but it is just showing "Unregistered" even if you are logged in... am I doing something wrong?
Grendel
01-02-2003, 08:10 PM
I'm using it exactly like you and it works.
Ember
01-02-2003, 08:12 PM
Ahh, but I am using it away from vb... using a php include to call the page into my homepage... and its not working... it might because I am using php functions for everything on the site... any ideas?
Ember
01-02-2003, 08:13 PM
I mean, it works when I go to the forum directory and try it, but not when I am using it on my homepage.
Grendel
01-02-2003, 08:14 PM
So why do you make a call on your homepage? Any reasons for this? Just make webtemplates your starting page.
Ember
01-02-2003, 08:20 PM
ehhh, my homepage is a tad more advanced than you think... I couldnt run it from webtemplates even if I wanted too, its got over 1000 lines of functions behind it...
Grendel
01-02-2003, 08:24 PM
Hm, okay.
Ever tried to build this code into the webtemplate? Maybe it works?
Logik
01-02-2003, 08:26 PM
Lol.. Watch out vB world. This kid has an 'advanced' forum.. haha ;)
Grendel
01-02-2003, 08:29 PM
Hm. Even if your posting is not against me - I don't think, you're helpful, Logik.
Ember
01-02-2003, 08:33 PM
Havent got an advanced forum, just a website that works, I dont know jack++++ about vb forums really, only how to make styles for them...
I'll give working the site into a webtemplate a miss... all I want to know is do you know why it wont display the users name when they're logged in? I tried including global.php too.
Ember
01-02-2003, 08:35 PM
Originally posted by Grendel
Hm. Even if your posting is not against me - I don't think, you're helpful, Logik.
No, he's a prick, there's a difference... I get the feeling he's one of those people who thinks he's better than you.
Grendel
01-02-2003, 08:35 PM
What type of "functions" do you have on your homepage?
Ember
01-02-2003, 08:39 PM
Basically everything that site uses... I have all my functions defined in one file, such as sql queries, php, all the html... and then I just call them in on the main pages, so I can edit everything in one place.
Ember
01-02-2003, 08:43 PM
by functions I mean defining stuff using php:
<?php
function head()
{
?>
<html>
<head>
<title>Title</title>
</head>
<body bgcolor="#cecece">
<?php
}
?>
and then to put it in the main site I just put:
<?php
head();
?>
But there is more complex stuff on other pages.. liking viewing a complete story, which usings the post function eg: news.php?id=1 to view news story one...
I am just wondering how to get it to work thats all :) hehe.
Grendel
01-02-2003, 08:44 PM
You could try to load it in an iframe on your homepage. Only netscape-users can't see this.
Ember
01-02-2003, 08:46 PM
That might work, i'd have to look up the code to make the iframe transparent as the cell its in has a background image.
Grendel
01-02-2003, 08:47 PM
The easiest way: just put your functions into webtemplates. I really played around with wt and you can do a lot of things with it.
Ember
01-02-2003, 08:49 PM
Ok, thanks for your help all the same... I may just add a fully fledged welcome bar onto my home page and be done with the whole thing :)
Logician
01-03-2003, 07:45 AM
Originally posted by OrangeCow.net
This may have been covered before, but I am using $user_username like this:
Welcome $user_username
but it is just showing "Unregistered" even if you are logged in... am I doing something wrong?
If Grendal's help solved the problem, ignore me plz.
If you still have the problem, I need some clarification: Can't you make webtemplates work all together or does it work but just $user_username not works? Also please mention if it works if you use it default: ie. you call show.php?pg=template_name directly without PHP includes..
Ember
01-03-2003, 09:11 AM
Ok, what I did was:
Create a new webtemplate that contained
Welcome $user_username
When I went to the address show.php?pg=welcome - it worked fine and showed Welcome Ember, however when I used php to include show.php?pg=welcome it would only show Welcome Unregistered, I tried including global.php to no effect.
Hope that clears it up!
XrayHead
01-03-2003, 09:26 AM
Very nice, will give this a go on my test forum :D
Doc203
01-03-2003, 06:19 PM
I think I just found what i didn't know I was looking for!
Awesome hack, and installs easy! Very fine Job Logician!
JohnXWA
01-06-2003, 01:08 PM
Are there any plans for a new version? PLEASE make it parse PHP.
How can I include login box, who's online etc on my front page using WebTemplates?
Thanks!
Birdie501
01-09-2003, 08:55 AM
will there be a new version?
Thanks!
Logician
01-10-2003, 11:53 AM
will there be a new version?
A few months ago I was working on the new version and adding a lot of new features. However new features got out of my hand and a lot of them are added until the hack structure didn't carry anymore. The new script was working ok but had performance problems when used under heavy traffic. Therefore I decided to make a revision in the hack algorithm so that script will deal with the new features well. However I stopped working on the structure change for as now VB3 is so close. It would be pointless to change the algorithm of the hack at the moment as we may need to rechange it after VB3.
I must also say that I had too many released hacks here in vb.org which requires my attention&support and it does not help much to have so many hacks when it comes to enhance them.
This is the story..Sorry for the delay of new version..
Birdie501
01-13-2003, 11:51 PM
ok thanks! another question! can i also call a webtemplate in another webtemplate?
XrayHead
01-13-2003, 11:59 PM
Ok, Just installed on my main Forum 2.8 and all went well.
Top Hack, Just need to look into how to use the sql side of things.
:rolleyes:
XrayHead
Thanks again for the hard work you put into this hack.
Logician
01-14-2003, 06:46 AM
Originally posted by Birdie501
can i also call a webtemplate in another webtemplate?
No you can't.. But you can use header and footer templates according to your needs if you are trying to form a standart look in many templates. As you know these 2 are called from other webtemplates.
XtReMaTriX
02-06-2003, 12:13 PM
Hey, i was just wondering if there was a query that lets you see:
Active Users: 25
2 members | 23 guests
ricksoprano , XtReMaTriX
Most users ever online was 71 on 01-31-2003
and that stuff on your template. I use mybvindex for my home page and i want the template to kinda mimic that. i can get everything working exept the active users...
A little help would be great...
Mustang5ohhh
02-20-2003, 12:43 AM
Very cool hack ... installed without a glitch on 2.2.9.
Very impressed.
Craigr
02-22-2003, 05:21 PM
Excellent hack, can't wait for the next version when you've got it done.
Craig
Craigr
02-23-2003, 07:08 PM
Is there any way you can edit your online.php to add the template locations so you can see people moving about the site?
For example i am browsing :
http://www.mysite.com/forum/show.php?pg=Links
In who is online i want to show the person:
Viewing the links page.
Thanks
Craig
Curator
02-23-2003, 11:38 PM
How does this script perform under *heavy* load? Of course it does depend on the server to a large degree, but are there bottlenecks? Slowdowns? Has it been tested on a high-traffic site?
Thanks.
Logician
02-24-2003, 07:14 AM
Originally posted by Craigr
Is there any way you can edit your online.php to add the template locations so you can see people moving about the site?
For example i am browsing :
http://www.mysite.com/forum/show.php?pg=Links
In who is online i want to show the person:
Viewing the links page.
Try this one:
Edit online.php, find:
}
$userinfo[time] = vbdate($timeformat,$userinfo[lastactivity]);
Before that add:
// Logician WebTemplates Hack
if (preg_match("/(pg=)(.*)(&)/siU", $userinfo[location], $l_match1) OR preg_match("/(pg=)(.*)/siU", $userinfo[location], $l_match2))
{
if ($l_match1[2]) {$lmatch=$l_match1[2];} else {$lmatch=$l_match2[2];}
$userinfo[where]= 'Reading Webtemplate: <a href="show.php?pg='.$lmatch.'" target="_blank">'.$lmatch.'</a>';
}
// Logician WebTemplates Hack
Enjoy..
Logician
02-24-2003, 07:23 AM
Originally posted by Curator
How does this script perform under *heavy* load? Of course it does depend on the server to a large degree, but are there bottlenecks? Slowdowns? Has it been tested on a high-traffic site?
I couldn't find a chance to test it under heavy load because my site's load is not high.. However I can see some bottlenecks that can increase PHP running time in the script if you have too much load. Actually this is why I didn't release the next version because script has too many features and its structure is not handling so many features perfectly at the moment. Although the version released is more basic than the unreleased next version, I still say take an eye on the performance if you have a heavy load. The best practise will be installing Microstats hack and monitor your webtemplates performance with it. Both hacks are competible, you just need to put microstat's hacks code inside your webtemplate to make it run with webtemplates.
If PHP running time is high under heavy load, there may be ways to optimize it by cancelling some features like webqueries..
Hopefully the next release will be much performance-friendly if it's is released.. :knockedout:
Boofo
02-24-2003, 07:56 AM
I'm waiting on the next release to install this, so I hope it happens. ;)
Craigr
02-25-2003, 02:57 PM
Originally posted by Logician
Try this one:
Edit online.php, find:
}
$userinfo[time] = vbdate($timeformat,$userinfo[lastactivity]);
Before that add:
// Logician WebTemplates Hack
if (preg_match("/(pg=)(.*)(&)/siU", $userinfo[location], $l_match1) OR preg_match("/(pg=)(.*)/siU", $userinfo[location], $l_match2))
{
if ($l_match1[2]) {$lmatch=$l_match1[2];} else {$lmatch=$l_match2[2];}
$userinfo[where]= 'Reading Webtemplate: <a href="show.php?pg='.$lmatch.'" target="_blank">'.$lmatch.'</a>';
}
// Logician WebTemplates Hack
Enjoy..
Thanks for that, i'll give it a go.
Craig
refertech
03-10-2003, 12:22 AM
Since I'm not that wonderful of a hard coder. Can I build my pages in say Dream Weaver and copy the source into your hack and build my pages that way?
Great idea. I love this hack.
Mark
Logician
03-10-2003, 11:18 AM
Originally posted by refertech
Since I'm not that wonderful of a hard coder. Can I build my pages in say Dream Weaver and copy the source into your hack and build my pages that way?
Great idea. I love this hack.
Mark
sure Mark, you can use any HTML design software you like to build your page, then simply copy paste its source code to "TEMPLATE" section and you are done.. :)
refertech
03-10-2003, 11:22 AM
Logician your the man. Thanks. Lets be best friends. :p I'll buy the beer. :)
Mark
Craigr
03-10-2003, 12:10 PM
Yes the hack is great. I'm running the majority of my site using it.
http://www.steven-seagal.net
Craig :D
refertech
03-10-2003, 12:12 PM
Good looking site you got there Craig. :D
refertech
03-11-2003, 12:07 AM
Logician I just got the hack install and I wanted to say again. Man this rocks. Thank you for offering this. So many ideas, I dont konw where to start. :)
Mark
Craigr
03-11-2003, 08:49 AM
Originally posted by refertech
Good looking site you got there Craig. :D
Thanks.
Craig
jbear6
03-13-2003, 02:29 AM
Originally posted by Logician
Try this one:
Edit online.php, find:
}
$userinfo[time] = vbdate($timeformat,$userinfo[lastactivity]);
Before that add:
// Logician WebTemplates Hack
if (preg_match("/(pg=)(.*)(&)/siU", $userinfo[location], $l_match1) OR preg_match("/(pg=)(.*)/siU", $userinfo[location], $l_match2))
{
if ($l_match1[2]) {$lmatch=$l_match1[2];} else {$lmatch=$l_match2[2];}
$userinfo[where]= 'Reading Webtemplate: <a href="show.php?pg='.$lmatch.'" target="_blank">'.$lmatch.'</a>';
}
// Logician WebTemplates Hack
Enjoy..
First off....Great Hack!
Everytime I add a new page to our website, I use this hack. Thanks again for all your time and effort.
I added the code above to online.php, and it works fine if you view "who's online" as an admin. When I view "who's online" as a registered member though, I see "Reading Webtemplate:", but nothing following the colon. For instance as an admin, I see "Reading Webtemplate: news", but as a registered user I see just "Reading Webtemplate:". I'm stumped :)
Thanks
Jbear6
Logician
03-13-2003, 09:56 AM
For instance as an admin, I see "Reading Webtemplate: news", but as a registered user I see just "Reading Webtemplate:".
Adding this line:
if ($bbuserinfo[usergroupid] != 6) {$userinfo[location] = htmlspecialchars(stripslashes(replacesession($user info[location])));}
Before line
if (preg_match("/(pg=)(.*)(&)/siU", $userinfo[location], $l_match1) OR preg_match("/(pg=)(.*)/siU", $userinfo[location], $l_match2))
might help..
jbear6
03-13-2003, 10:26 AM
That worked! UDA MAN Logician!
Thanks again,
Jbear6
Keichii
03-14-2003, 01:54 PM
Umm. i'm a newbie.. so i'm not sure if this is possible. Can show.php be put in a directory other than the forums.. and if it can't is there anywayt to do that..
Logician
03-14-2003, 06:50 PM
Today at 05:54 PM Keichii said this in Post #208 (https://vborg.vbsupport.ru/showthread.php?postid=366076#post366076)
Umm. i'm a newbie.. so i'm not sure if this is possible. Can show.php be put in a directory other than the forums.. and if it can't is there anywayt to do that..
I didnt test it myself either, it may or may not work.. Just give it a try, but don't forget to add the line
chdir('/usr/local/apache/sites/yourforumdir/');
at the begining.
BTW. IMO this shouldn't be very crucial. It's just the URL that matters so the hack will work in the same way even if its in forum dir or not.. My 2 cents..
Keichii
03-14-2003, 07:49 PM
yay it works ^__^
if i put the show.php in a different directory will it slow down the page loading time by any chance?
Logician
03-15-2003, 06:53 AM
nope performance will not change.. Enjoy
refertech
03-15-2003, 02:25 PM
Some reason when i call the template i just created I keep getting the follwing:
Error Message
The page you requested does not exist!
Please check the address you want to visit. If you arrived this page by clicking a link inside this site, you may notify the Site Administrator about the broken link. Thank you!
Edit: Never mind I got it. I was being a dope. :)
Craigr
03-15-2003, 03:27 PM
03-13-03 at 04:29 AM jbear6 said this in Post #205 (https://vborg.vbsupport.ru/showthread.php?postid=365273#post365273)
I added the code above to online.php, and it works fine if you view "who's online" as an admin. When I view "who's online" as a registered member though, I see "Reading Webtemplate:", but nothing following the colon. For instance as an admin, I see "Reading Webtemplate: news", but as a registered user I see just "Reading Webtemplate:". I'm stumped :)
Thanks
Jbear6
I didn't even notice this. But the fix works great.
Thanks again Logician.
Craig
Intex
03-30-2003, 09:58 AM
Logician - Nice Hack :cool:.
I have a few points to note:
Installation
On initial installation I received the following errors (even though everything seemed to go ok:
Error on Page 1:
Warning: Undefined index: p in c:\program files\apache group\apache\htdocs\forum\webtemplates_install.php on line 74
Error on Page 4:
Warning: Undefined variable: pagetitle in c:\program files\apache group\apache\htdocs\forum\webtemplates_install.php on line 312
As I mentioned the installation and testing afterwards suggests this worked ok anyway, so not sure how relevant those errors are.
Installation Documentation
Just a small point really, you mention in your installation instructions about getting the additional help relating to the hack, referencing:
To learn how to use the hack, please call {YOUR FORUM URL}/show.php?pg=Webtemplatehelp and {YOUR FORUM URL}/show.php?pg=Webqueryhelp files
I believe these should be pointed to:
show.php?pg=webtemplate_help and show.php?pg=webquery_help, respectively (with the forum path of course).
Style Issue
Although your test page loads successfully, my header and footer components don't show up. I'm not sure whether this is by design or not.
Of course it was easy for me to go to my relevant style and copy the code there which sorted it fine, but what happens if people have multiple styles.
Is there any way to point the webtemplates header and footer templates to their selected or default style?
I'll have a play with it in more detail now. Keep up the good work :cool:.
Logician
03-30-2003, 06:09 PM
Today at 01:58 PM Intex said this in Post #214 (https://vborg.vbsupport.ru/showthread.php?postid=375440#post375440)
Style Issue
Although your test page loads successfully, my header and footer components don't show up. I'm not sure whether this is by design or not.
Of course it was easy for me to go to my relevant style and copy the code there which sorted it fine, but what happens if people have multiple styles.
If you put $header and $footer variables to any webtemplate, it's suppose to insert your header and footer there. Doesn't it act so?
ryancooper
03-31-2003, 04:31 PM
Is it possable to have individual pages
EX: http://myURL/show.php?pg=whoareyou = Viewing who are you page
http://myURL/show.php?pg=menus = viewing Menus page
etc . . .
work with Firefly's Add Who's Online locations from Admin CP hack? https://vborg.vbsupport.ru/showthread.php?s=&threadid=32849
Thanks!!
Logician
04-01-2003, 07:50 AM
Yesterday at 08:31 PM ryancooper said this in Post #216 (https://vborg.vbsupport.ru/showthread.php?postid=375999#post375999)
Is it possable to have individual pages
EX: http://myURL/show.php?pg=whoareyou = Viewing who are you page
http://myURL/show.php?pg=menus = viewing Menus page
etc . . .
work with Firefly's Add Who's Online locations from Admin CP hack? https://vborg.vbsupport.ru/showthread.php?s=&threadid=32849
Thanks!!
If what you are asking is to display webtemplate viewing in who is online, I've already given the code in this thread a few posts above.
ryancooper
04-01-2003, 11:15 AM
Yesterday at 09:50 PM Logician said this in Post #217 (https://vborg.vbsupport.ru/showthread.php?postid=376236#post376236)
If what you are asking is to display webtemplate viewing in who is online, I've already given the code in this thread a few posts above.
Awesome that was a lot easier than adding each page. Thanks!!
WoodiE
04-06-2003, 10:04 PM
I get this error:
Parse error: parse error, unexpected ',' in /home/rcnitro/public_html/forum/online.php on line 295
When I use Logician's who' online mod as listed above. I'm using vb 2.2.8
-WoodiE
Craigr
04-08-2003, 02:40 PM
Yesterday at 12:04 AM WoodiE said this in Post #219 (https://vborg.vbsupport.ru/showthread.php?postid=378468#post378468)
I get this error:
Parse error: parse error, unexpected ',' in /home/rcnitro/public_html/forum/online.php on line 295
When I use Logician's who' online mod as listed above. I'm using vb 2.2.8
-WoodiE
Make sure you copy all the code to the exact location in online.php
If you miss something it may not work. It works great for me with vb 2.2.9
Craig
Logician
04-09-2003, 06:41 AM
04-07-03 at 02:04 AM WoodiE said this in Post #219 (https://vborg.vbsupport.ru/showthread.php?postid=378468#post378468)
I get this error:
Parse error: parse error, unexpected ',' in /home/rcnitro/public_html/forum/online.php on line 295
When I use Logician's who' online mod as listed above. I'm using vb 2.2.8
I believe if you read here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=39142) (especially part ADD AFTER, ADD BEFORE), your problem will be cured..
amp2000
04-11-2003, 02:22 PM
This looks like a great hack, has anyone gotten it to work with VB 2.3.0 ??
Thanks
amp2000
EDIT: Nevermind, I tried it and it & it seems to work with 2.3.0 :p
Great work..
amp2000
ryancooper
04-15-2003, 06:38 PM
02-26-03 at 05:51 AM Craigr said this in Post #197 (https://vborg.vbsupport.ru/showthread.php?postid=358261#post358261)
Thanks for that, i'll give it a go.
Craig
I get the error when I add the above. . .
Parse error: parse error, unexpected ',' in /home/talkdis/public_html/forums/online.php on line 315
The Piper
04-24-2003, 03:06 AM
I've been using Logician's WEBTEMPLATES hack for the longest time for several pages on my website, it's one of the greatest hacks ever developed (along with vbHome (lite) and vbMicroStats, IMHO). However, I've never really liked the format of the URLs with the WEBTEMPLATES hack.
URLs right now look like this: http://www.pinkfloydfan.net/show.php?pg=books
The problem is, search engines, specially Google, don't seem to like URLs with parameters passed through them, such as the "?pg=books" part.
So, after some research, I found out how to use Apache's .htaccess to have search-engine friendly links.
First, make sure your server has the Apache module mod_rewrite installed..
Open .htaccess, and add:RewriteEngine on
RewriteRule ^books\.php$ show.php?pg=books [NC]
RewriteRule ^posters\.php$ show.php?pg=posters [NC]You can change the first part (^books\.php$) to whatever file name you would like your webtemplate to have, including a .html extension, such as ^this_is_my_books_page\.html$. Add as many lines as you wish/need. I have as many lines as webtemplates, so now all of them are search-engine friendly.
Also, make sure that if you already have a "RewriteEngine on" line on your .htaccess, that you don't add a second one.
Check it out for yourself: http://www.pinkfloydfan.net/books.php. It takes you to the same WEBTEMPLATE as the previous URL.
Just thought I'd share this with you. Logician, again, congrats on this great hack. I hope you keep on developing it. One thing I'd like to see that shouldn't be too hard to implement is a "Search" function for WEBTEMPLATES, much like we have for the Templates on VB's Admin CP.
I'm also having problems with the Who's Online hack you just posted a few posts back, much like other users. Would you please be so kind as to double check to see if your instructions are precise? Thanks a lot!
Craigr
04-24-2003, 10:34 AM
Thanks The Piper, i will have to add that, i've probably got about 100 templates now, but it will be worth it if they are picked up by google.
Craig
Logician
04-24-2003, 01:53 PM
To show webtemplates properly in who is online page:
Logician
04-24-2003, 01:58 PM
Just thought I'd share this with you.
Piper thx for the nice tip.. I'll link it in the first post.
hope you keep on developing it.
Yes I have intentions to develop it (actually rewrite it!) after vb3 is released.
I'm also having problems with the Who's Online hack you just posted a few posts back, much like other users. Would you please be so kind as to double check to see if your instructions are precise?
My instructions are correct. I rechecked and it is working ok here. But I believe people are missing some basic hacking rules like when said "add after" or "add before", it means add one line above or below, NOT to the same line.
Anyway to avoid such misunderstandings, I rephrased my instructions and published one post above. It should be clearer now.. :)
Enjoy..
Craigr
04-24-2003, 02:01 PM
Today at 02:58 PM Logician said this in Post #227 (https://vborg.vbsupport.ru/showthread.php?postid=386446#post386446)
Yes I have intentions to develop it (actually rewrite it!) after vb3 is released.
Wow, can't wait. I wasn't going to upgrade to vb3 because i would probably lose this hack, 90% of my site is powered by it.
So thank for the good news. :banana:
Craig
The Piper
04-24-2003, 03:33 PM
Piper thx for the nice tip.. I'll link it in the first post.Always a pleasure, never a chore. :)
Yes I have intentions to develop it (actually rewrite it!) after vb3 is released. That's great to hear, Logician. One more reason to upgrade to vb3, as several of my main pages are driven by WebTemplates.
My instructions are correct. I rechecked and it is working ok here. But I believe people are missing some basic hacking rules like when said "add after" or "add before", it means add one line above or below, NOT to the same line. I just used your new instructions, and it is working like a charm! :) Thanks for that!
leviw
04-28-2003, 03:17 AM
Installed easily in about 10 minutes, no problems at all using vb 2.3.0
Playing around with the options now, this has a lot of potential!
leviw
04-28-2003, 10:01 PM
I'm having some trouble getting templates to work properly.
Heres what I have so far:
I went to Add Webtemplate, entered all info as "demo", page count 0, template info is: Hello $s2sheader
I went back into Add Webtemplate and made one called s2sheader, page count 0, info is: world.
Then I load example. com/forum/show.php?pg=demo
It loads a blank white page that says "Hello"
So.. the $s2sheader is not loading properly. What gives?
I also tried copying the webtemplate as a normal template, but same results. What am I doing wrong?
Thanks in advance!
leviw
04-29-2003, 05:25 AM
After fiddling with it I havnt gotten any further. None of my templates will load.
Is there something I need to do to prep or preload the template?
I dont understand why the premade $footer template will work, but my template right next to it wont. There must be something else at work here but I'm not seeing it. Help!
Logician
04-29-2003, 07:02 AM
Today at 09:25 AM leviw said this in Post #232 (https://vborg.vbsupport.ru/showthread.php?postid=388772#post388772)
I dont understand why the premade $footer template will work, but my template right next to it wont. There must be something else at work here but I'm not seeing it. Help!
The hack does not have "template-in-template" feature except footer and header templates. (at least yet, I may or may not add this feature to the next version, still pondering about it) So this is why your first template was not displayed inside your second one.
Hi Logician,
Is this hack compatible with 2.3.0?
Logician
04-29-2003, 01:59 PM
yes it is glo
leviw
04-29-2003, 10:59 PM
The hack does not have "template-in-template" feature except footer and header templates.
Bummer, that was a huge reason I wanted to use WebTemplates.
Koutaru
04-29-2003, 11:58 PM
just wondering
How could I show users browsing this page. For example (like this thread):
(Users Browsing this Thread: Koutaru, Another User, User 3)
Instead of Thread..
(Users Browsing this Page: Koutaru, Another User, User 3)
Or maybe you could point me in the direction of adding this little addon?
gmarik
05-02-2003, 05:22 AM
You should work on the screenshot more than on the code - tip, tip!
Hi Logician,
Could you please tell me if you hack could replicate my main page (http://www.glo-racing.com/v3/main.html) ?
And where are some live examples? preferably in English
Logician
05-02-2003, 07:00 AM
replicate?
After installing the hack, you can simply copy/paste the source code of your page into a webtemplate and your page will be a webtemplate then. Is this what u are asking?
However as mentioned in the hack thread this hack is not coded for "site main page" altough some people use it for their main pages too.
I get it now; i think! :nervous:
And i see what your "whose Online" addition does! :cheeky:
Can I use it to add other hacks or modified vB code?
For example if I cut and paste the code from the vB "login" template and place it inside a template that will be displayed on a non-Vb page. Will that display and work correctly?
Logician
05-02-2003, 02:55 PM
Today at 11:06 AM glo said this in Post #241 (https://vborg.vbsupport.ru/showthread.php?postid=390309#post390309)
I get it now; i think! :nervous:
And i see what your "whose Online" addition does! :cheeky:
Can I use it to add other hacks or modified vB code?
For example if I cut and paste the code from the vB "login" template and place it inside a template that will be displayed on a non-Vb page. Will that display and work correctly?
Webtemplates display/process all default vb variables that are assigned a value in global.php correctly. Eg. $logincode or default vb options variables.
However if a vb variable has assigned a value in an other vb file (eg. member.php, index.php, private.php etc.), obviously webtemplates can not display it correctly because its file does not run prior to webtemplate to assign this variable a value. So for instance the variable that saves member count of your board has assigned a value in index.php so it will be blank if you use it in a webtemplate
ChurchMedia
05-02-2003, 03:35 PM
First of all -- fantastic hack! Exactly what I was looking for. I followed your instructions for putting the show.php file in another directory:
Add this line to the file:
chdir('/usr/local/apache/sites/yourforumdir/');
It works, but it isn't accessing my header/footer info, etc. It's probably an easy thing to fix. Any ideas?
Thanks! :)
Logician
05-02-2003, 04:13 PM
Today at 07:35 PM ChurchMedia said this in Post #243 (https://vborg.vbsupport.ru/showthread.php?postid=390467#post390467)
First of all -- fantastic hack! Exactly what I was looking for. I followed your instructions for putting the show.php file in another directory:
It works, but it isn't accessing my header/footer info, etc. It's probably an easy thing to fix. Any ideas?
Not "accessing" your header/footer? Is it blank or what?
ChurchMedia
05-02-2003, 04:24 PM
Not "accessing" your header/footer? Is it blank or what?
Nevermind!! I was forgetting to put in $header and $footer in the html. Duh! Sorry about that!
Logician
05-02-2003, 05:04 PM
hehe np :)
Koutaru
05-03-2003, 02:58 PM
O_o I could have sworn I saw this thread before I posted my quick reply. I even searched this thread for some previous answers before I posted. Weird. Oo; I have no idea how it got into your other hack's thread xD; Sorry
Anyway, I edited the line:
xD I edited the line
if ($requested_template=="") {eval("dooutput(\"".logiciangettemplate("notfound")."\");");exit;}
to
if ($requested_template=="") {eval("standarderror(\"".gettemplate("error_notfound")."\");"); exit;}
But neither codes work. Even the original one won't show the page not found. However, it will show the page not specified error. oO; do you know why this is?
Logician
05-03-2003, 08:24 PM
Yesterday at 06:58 PM Koutaru said this in Post #247 (https://vborg.vbsupport.ru/showthread.php?postid=390877#post390877)
Even the original one won't show the page not found. However, it will show the page not specified error. oO; do you know why this is?
a) Was it so since day one you installed the hack or did it become so after you hacked the hack?
b) if it does not show the page not found template, what exactly happens when you call an non-existing template?
c) Why dont you simply copy paste the error_notfound templates content into notfound instead of hacking?
Koutaru
05-03-2003, 10:33 PM
a) I believe it worked before. I even tried reuploading the original show.php and still, nothing.
b) It just shows a blank page. I know the function worked because the HTML source has
<!-- BEGIN TEMPLATE: template -->
<!-- END TEMPLATE: template -->
c) Because I.. There's really not much to say about that. I guess I wanted a standard error to show up. But even with the original notfound it doesn't work.
EDIT: I'm using 2.30
I tried installing on my 2.2.9 and it worked fine so it isn't my server. I think it may be my functions.php even though I'm not sure exactly what Oo; I doublechecked the installation manual and everything
O_o or maybe
if ($requested_template=="")
isn't working
Logician
05-04-2003, 07:01 PM
Today at 02:33 AM Koutaru said this in Post #249 (https://vborg.vbsupport.ru/showthread.php?postid=390995#post390995)
a) I believe it worked before. I even tried reuploading the original show.php and still, nothing.
b) It just shows a blank page. I know the function worked because the HTML source has
<!-- BEGIN TEMPLATE: template -->
<!-- END TEMPLATE: template -->
c) Because I.. There's really not much to say about that. I guess I wanted a standard error to show up. But even with the original notfound it doesn't work.
EDIT: I'm using 2.30
I tried installing on my 2.2.9 and it worked fine so it isn't my server. I think it may be my functions.php even though I'm not sure exactly what Oo; I doublechecked the installation manual and everything
O_o or maybe
if ($requested_template=="")
isn't working
ok please try these and let me know:
1- Admin CP/vb settings/Add template name in comments set to NO and see if it worked.
2- Delete template "notfound" and reform it.
Hopefully one of these steps will do the trick.. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.