vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   WebTemplates v.0.1 (Old Version) (https://vborg.vbsupport.ru/showthread.php?t=36419)

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

Quote:

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

Quote:

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\webtemplates_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

Quote:

Originally posted by Limpkinw

Notice: Undefined variable: pagetitle in D:\Inetpub\wwwroot\www.limpkinw.com\forum\webtemplates_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:
Code:

... please call {YOUR FORUM URL}/show.php?pg=Webtemplatehelp and {YOUR FORUM URL}/show.php?pg=Webqueryhelp files ...
Should be
Code:

... 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

Quote:

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

Quote:

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

Quote:

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

Quote:

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

Quote:

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.


Quote:

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. ;)


Quote:

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

Quote:

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

Quote:

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:
Code:


                    W E B  T E M P L A T E

WEBTEMPLATE NAME :
--------------------
test


TEMPLATE:
------------ template cut start ------------------------------------------
[options]templatequeryon[/options]
[[($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/showthrea...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?

cono 11-08-2002 07:03 PM

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

Quote:

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

Quote:

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

Quote:

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:

PHP Code:

settype ($p"integer"); 

Before that add:

PHP Code:

$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

Quote:

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.


All times are GMT. The time now is 03:05 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01707 seconds
  • Memory Usage 1,860KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete