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)

inetd 07-23-2002 04:01 PM

Quote:

Originally posted by Logician
inetd,

Quote:

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

[[($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 [options]templatequeryon[/options] in header also don't work. Result in page: [options]templatequeryon[/options]

Help me please.

Logician 07-23-2002 05:50 PM

Quote:

Originally posted by inetd

i use your code in header webtemplate and don't work. Result: [[(6==6)]]I see[[/(6==6)]] And [options]templatequeryon[/options] in header also don't work. Result in page: [options]templatequeryon[/options]

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

[[($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

Quote:

Originally posted by inetd
Other trouble :( :)
In custom webtemplate i use
Code:

[[($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..

PHP Code:

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

Quote:

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

Quote:

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

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

Quote:

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

Quote:

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)

Quote:

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

Quote:

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

Quote:

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

Code:

<?php include ("news.php"); ?>
Somethign like that, but webtemplates is displaying it.

Drk

Logician 07-29-2002 10:19 PM

Quote:

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

Quote:

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

Quote:

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:

Quote:

SELECT threadid, left(title,18), forumid, postusername, dateline FROM thread WHERE forumid='28' ORDER BY dateline DESC LIMIT 10
Table:

Quote:

<tr><td class="leftboxcontent"><a href="$bburl/showthread.php?s=&threadid=??threadid??">??title?? </a></td><tr>
The result:

Rose 07-30-2002 07:30 PM

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

Quote:

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

Quote:

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

Quote:

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

Quote:

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.

Quote:


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


Quote:

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

Quote:

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.

Rose 07-31-2002 02:27 PM

Quote:

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*

Quote:

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


Quote:

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

Quote:

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

Quote:

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

Quote:

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


All times are GMT. The time now is 01:49 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.01849 seconds
  • Memory Usage 1,869KB
  • 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
  • (3)bbcode_php_printable
  • (30)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