vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   [WEBTEMPLATES HACK:]Share your WebTemplates or WebQueries! (https://vborg.vbsupport.ru/showthread.php?t=36578)

mbaskett 07-26-2002 05:30 PM

Just a quickie here...

I got the new version up and started some basics of config and whatnot... Of course I re-edited the show.php to use the vb header and footer templates, as well as working with our PHPAdsNew implementation.

First impressions:

Like the new adminCP setup. Having a seperate file is a bit nicer. I *think* I did the upgrade steps properly, btu was a bit unclear if I should have removed the webqueries code from tempate.php or if it was just the webtemplates code....

I did a small bit of tweaking of webtemplate.php so that the layout in the adminCP is a bit clearer. Most of it was because all our webtemplates are ordered based on their name, which we use for organization and sorting, etc.

The code below also keeps a small bit of code from being repreated.. I know it's minor, but it can play a role on page load time when you are listing MANY templates....

PHP Code:

// ###################### Start weblist #######################
if ($action=="weblist") {

echo 
'<table width="100%" border="1" cellspacing="0" cellpadding="0"><tr><td style="BACKGROUND-COLOR: #cecfce; border: 2px outset; padding-left: 3px; FONT-FAMILY: Verdana, MS Sans Serif; FONT-SIZE: 11px; text-align: center;"><div align="center"><font size="4"><b>Your Existing Web Templates:</b></font></div></td></tr><tr><td>';
echo 
'<table width="100%" border="0" cellspacing="0" cellpadding="0">';
 
$log_webtitles=$DB_site->query("SELECT templateid, title,count FROM webtemplates ORDER BY title"); 
  while (
$tumsatir=mysql_fetch_row($log_webtitles)) 
     {
     
$iii++;  if ($iii%2==0) {$tbbgcolor='#F1F1F1';} else {$tbbgcolor='#DFDFDF';}
     echo 
'<tr bgcolor="'.$tbbgcolor.'"><td width="30" align="right">';
     echo 
"$iii- </td><td align=left><b>$tumsatir[1]</b></td><td> - $tumsatir[2] visits ".     makelinkcode("edit","webtemplate.php?s=$session[sessionhash]&action=webedit&templateid=$tumsatir[0]").
     
makelinkcode("remove","webtemplate.php?s=$session[sessionhash]&action=webremove&templateid=$tumsatir[0]").
      
makelinkcode("visit","$bburl/show.php?s=$session[sessionhash]&pg=$tumsatir[1]").
     
makelinkcode("download","webtemplate.php?s=$session[sessionhash]&action=webtemplatedownload&templateid=$tumsatir[0]")."\n";
     echo 
'</td></tr>';
    }
echo 
'</table>';
echo 
'<tr><td>[<a href="webtemplate.php?s='.$session[sessionhash].'&action=webadd">Add a New WebTemplate<a/>]</td></tr>';        
echo 
'<tr><td style="BACKGROUND-COLOR: #cecfce; border: 2px outset; padding-left: 3px; FONT-FAMILY: Verdana, MS Sans Serif; FONT-SIZE: 11px; text-align: center;"><b>WebTemplates & WebQuery Hack</b> by <i>Logician</i>  \\\\=^))</tr></td>';
echo 
'<tr><td><div align="center"><small><a href="'.$webtemplates_helpurl.'" target="_blank">WebTemplates Help Page - <a href="'.$webqueries_helpurl.'" target="_blank">WebQueries Help Page</a> - <a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=36419" target="_blank">Vbulletin.org Thread</a> - <a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=36578" target="_blank">Share Your WebQueries</a></div></td></tr></table>';
echo 
'<li><small>"notallowed" template is loaded, if visitor tries to access an unallowed page and "notfound" template is shown, if the requested page does not exist.</small></li>';



//if ($action=="weblist") 


Logician 07-29-2002 07:07 AM

Quote:

Originally posted by mbaskett
was a bit unclear if I should have removed the webqueries code from tempate.php

It's not important. After the upgrade, hack codes in template.php become obsolete and will not be used again. So best practise is to delete them, but if you dont, its no big deal, they are harmless in there..

Quote:

I did a small bit of tweaking of webtemplate.php so that the layout in the adminCP is a bit clearer. Most of it was because all our webtemplates are ordered based on their name, which we use for organization and sorting, etc.
So you changed sort order?

mbaskett 07-30-2002 07:57 PM

Quote:

Originally posted by Logician

It's not important. After the upgrade, hack codes in template.php become obsolete and will not be used again. So best practise is to delete them, but if you dont, its no big deal, they are harmless in there..

Fair enough ;)


Quote:

So you changed sort order?
I don't believe the order itself was changed, just the formatting. Removed a <table> tag that was being looped through for coding sake (basically each template in the list was showing up in own table. While it was not visually noticable, the simple creation of the table,tr,td, /td,/tr,/table tags for EACH template in the list was inefficient... so instead I changed it to one table with the tr,td,/td,/tr tags being looped through.

I've also added one addition function to the hack as of now... a description field. We plan on using this for menu population (as our template names are probably not visually appealling to see in auto-populated menus....) more on this later once it's all completed and in the testing phases.

Rose 07-30-2002 08:05 PM

I installed this a day or three ago. Love it so far! (I posted in the hack thread regarding some specific questions).


I just added Wild Thinks query/last ten threads and modified it abit. :D Works nice. However, I'm interested in this "new version" that parses vbcode. Right now it shows the [ quote ] tags and such if they are at the beginning of the post.


edited to add - Is there anyway to NOT show posts in private forums on the site's "last ten posts"? I don't want links to the moderator's lounge popping up (granted, mebmers can't get in, but let's not flaunt it!).

Any ideas? Query modifications?

Rose 07-30-2002 08:58 PM

Also, on my site I have the "Welcome back, Username" here. For unregistered members/guests - how would I include a login panel for them?

Logician 07-31-2002 07:42 AM

Rose,
Quote:

Originally posted by Rose
I just added Wild Thinks query/last ten threads and modified it abit. :D Works nice. However, I'm interested in this "new version" that parses vbcode. Right now it shows the [ quote ] tags and such if they are at the beginning of the post.

The new version is in progress.. In fact I sent them to some power users so that they can return me comments and it's proved to be working ok. But I cant guarantee it has no bugs at the moment and I cant support it until I release it. So if this is not a problem for you and want to test it out, drop me your mail address and I'll send it to you. If you want to have the "stable" and "final" version, you have to wait until it's released..
Quote:

edited to add - Is there anyway to NOT show posts in private forums on the site's "last ten posts"?
Sure you have to modify Wildthinks query a bit: Replace XXX, YYY and ZZZ with forumids in the query below to exclude these forums:

SELECT thread.title as threadname, thread.threadid, thread.forumid, from_unixtime(post.dateline,'%d.%m.%Y - %H:%i:%s') as dd, left(post.pagetext,80) as pagetxt, post.username, post.userid, forum.forumid, forum.title FROM thread,post,forum where post.threadid=thread.threadid and thread.forumid=forum.forumid and thread.forumid<>XXX and thread.forumid<>YYY and thread.forumid<>ZZZ order by post.dateline desc limit 10

Quote:

Also, on my site I have the "Welcome back, Username" here. For unregistered members/guests - how would I include a login panel for them?
You can use a "conditional" like this:
[[($bbusergroupid==1)]]
Copy paste the login form's HTML code here.
[[/($bbusergroupid==1)]]

It's like the hidden text in my sample webtemplate. If the user is unregistered/unloggedin, this conditional will be parsed and he'll get the code in between. If he is a loggedin member, he wont see that part in the webtemplate.. ;)

Rose 07-31-2002 02:07 PM

Thank you, Logician! I've changed the query so that my private forums info stays private. :D

But I'm still having trouble using the login form. DkrFusion gave me the code to have it say Welcome Back "so and so" - but even when I'm logged in I see "Unregistered". Logged into the forums, anyway. I can't seem to ever be "logged into" the site - yet I can't logout and see the login box what I put in according to your instructions. Any ideas? *hehe*

Logician 07-31-2002 02:18 PM

Quote:

Originally posted by Rose
But I'm still having trouble using the login form. DkrFusion gave me the code to have it say Welcome Back "so and so" - but even when I'm logged in I see "Unregistered". Logged into the forums, anyway. I can't seem to ever be "logged into" the site - yet I can't logout and see the login box what I put in according to your instructions. Any ideas? *hehe*
I think I didnt get it right? Can you please post the webtemplate (or the relevant part) that you are talking about. And clarification on what exactly you are trying to achieve on this webtemplate can also help.. :knockedout:

Rose 07-31-2002 02:30 PM

Quote:

Originally posted by Logician

I think I didnt get it right? Can you please post the webtemplate (or the relevant part) that you are talking about. And clarification on what exactly you are trying to achieve on this webtemplate can also help.. :knockedout:

*hehe* Sure - here's what I'm doing. On the index page of the site, I want it to welcome back each member by name - or if they aren't logged in or registered - a login box would be provided.


Here's the code I'm working with - it may be off, but it's what I got:


(quoted in php because.....I thought it'd be better that way?)

PHP Code:

<!-- Left Column Body Start -->
<
td valign="top" width="200"><table bgcolor="#F6EDCA" cellpadding=5 cellspacing="1"><tr width=100height=100%><td background="http://www.thesistersthree.com/site/headerbg.jpg" align=center>
<
font face=verdana color="#FBF5E1" size=1><b>Welcome Back $user_username</b></font></td></tr>
<
tr><td bgcolor=#330000">
[[($bbusergroupid==1)]]
<
form action="member.php" method="post">
<
tr>
    <
td nowrap><smallfont><b>Not cookied?</b><br>Login with username and password:</smallfont></td>
</
tr><tr>
    <
td nowrap><input type="hidden" name="s" value="$session[sessionhash]">
    <
input type="hidden" name="action" value="login">
    <
input type="text" class="bginput" name="username" size="7">
    <
input type="password" class="bginput" name="password" size="7">
    <
input type="submit" class="bginput" value="Login!"></td>
</
tr>
</
form>

[[/(
$bbusergroupid==1)]]</td></tr>

<
tr>
<
td bgcolor="#330000"><font face=verdana color="#FBF5E1" size=1>
<
a href="http://www.thesistersthree.com/forums/usercp.php?"><center><b>My Control Panel</b></center></a><br


Logician 07-31-2002 07:12 PM

Quote:

Originally posted by Rose

*hehe* Sure - here's what I'm doing. On the index page of the site, I want it to welcome back each member by name - or if they aren't logged in or registered - a login box would be provided.

ok I see your problem: Use conditional in this format:

[[($bbuserinfo[usergroupid]==1)]]

Of course closing conditional will be replaced too:
[[/($bbuserinfo[usergroupid]==1)]]

Rose 07-31-2002 07:29 PM

Quote:

Originally posted by Logician

ok I see your problem: Use conditional in this format:

[[($bbuserinfo[usergroupid]==1)]]

Of course closing conditional will be replaced too:
[[/($bbuserinfo[usergroupid]==1)]]


That seems to allow the code to show up! Now that I have it so a member can login, how can I get it to return them to the site page, not the forums page?

Also, I'm still having problems with the "Welcome Back ....." as no matter if a member is logged in or out - it still says unregistered and displays the Unregistered name. However, the "My control Panel" link is working. :s

Oh the frustrations! *hehe* This is a great addition/hack, Logician. I really do hope it works out well as it seems to be so far, minus the few tricks here and there.

You've mentioned how with queries it is endless, which is why a list of helpful queries hasn't been posted. However, I've only seen one that has shared so far (the last ten posts). I'm interested in doing more with this hack, but I can't write my own queries just yet. Is there any plans to release some basics to choose from so we can modify them to fit? Suggestions and such?

Logician 08-01-2002 07:10 AM

Quote:

Originally posted by Rose
That seems to allow the code to show up! Now that I have it so a member can login, how can I get it to return them to the site page, not the forums page?

Do you need your member to login first before she can display the page? Then why dont you simply use [cantsee]1[/cantsee] tag inside your webtemplate? I guess this will do the trick for you: if she is unregistered/unloggedin she'll get "not allowed" (together with login) page and if she is registered/loggedin she can view the template. What do u think about this solution?

Quote:

Also, I'm still having problems with the "Welcome Back ....." as no matter if a member is logged in or out - it still says unregistered and displays the Unregistered name.
Your format seems correct. Are you sure you are visiting the template after you logged in? Maybe you can create a member account for me in your site (pls pm username and password and template name to me) and let me check it..

Quote:

You've mentioned how with queries it is endless, which is why a list of helpful queries hasn't been posted. However, I've only seen one that has shared so far (the last ten posts). I'm interested in doing more with this hack, but I can't write my own queries just yet. Is there any plans to release some basics to choose from so we can modify them to fit?
The problem is I dont have time for all: I develop the new version, I give support for the hack and I have many other released hacks which I also give support. Yes it would be nice if some basic webquery samples would be released (for which this thread is created) but it would be nicer if some of the hack users who can do it would share theirs for all of us instead of waiting me to do everything. ;)

I'm hoping that this problem would be solved in the new version to a certain extent. I integrated "download webquery/webtemplate" feature into the new version and with one click you would be able to create a text file with how to install installations of your webtemplates and webqueries. So all you have to do is to attach this file in a reply in this thread. Therefore I'm hoping that sharing traffic would get higher after this release. Hopefully..

Rose 08-01-2002 01:06 PM

Quote:

Originally posted by Logician
Do you need your member to login first before she can display the page? Then why dont you simply use [cantsee]1[/cantsee] tag inside your webtemplate? I guess this will do the trick for you: if she is unregistered/unloggedin she'll get "not allowed" (together with login) page and if she is registered/loggedin she can view the template. What do u think about this solution?
I think I'll try it and see if it works! :D Will edit this post afterwards. ;)
Edited to say: - Okay. I've added the cansee/cantsee bit. Now it takes me to login. Making progress. :D However, when I login, it calls for /site/member.php (when obviously it's in the /forums directory). I can't copy member.php to the site folder because that doesn't work, either. How do I get it to call from the forums directory (I thought I had that done).

Quote:

Your format seems correct. Are you sure you are visiting the template after you logged in? Maybe you can create a member account for me in your site (pls pm username and password and template name to me) and let me check it..
I'm sure I'm logged into the forums. I'm not sure if I'm logged into the website - I would assume they both use the same stuff, though. I'll pm you specifics as soon as I can with pass/user.


Quote:

The problem is I dont have time for all: I develop the new version, I give support for the hack and I have many other released hacks which I also give support. Yes it would be nice if some basic webquery samples would be released (for which this thread is created) but it would be nicer if some of the hack users who can do it would share theirs for all of us instead of waiting me to do everything. ;)

I'm hoping that this problem would be solved in the new version to a certain extent. I integrated "download webquery/webtemplate" feature into the new version and with one click you would be able to create a text file with how to install installations of your webtemplates and webqueries. So all you have to do is to attach this file in a reply in this thread. Therefore I'm hoping that sharing traffic would get higher after this release. Hopefully..
I understand. I guess I shall start taking a more proactive stance here, start writing a few things and seeing if they work, and then contribute! :D That will be on my todo list. *nods* And your plans for the next release sounds grand. :D

Craigr 02-23-2003 04:26 PM

Anybody want to share some more queries?

Craig

Craigr 03-30-2003 03:55 PM

Hi,

Is there any way someone could write a query that i could use in the templates.

I want a query that extracts the last 5 posts from a thread and displays part of it say the first few hundred characters. If possible also displays the posters name and time posted.

I managed to alter Pluh News to do this, but you can't include php files in Webtemplates.

Thanks
Craig

Logician 03-30-2003 06:18 PM

1 Attachment(s)
Quote:

Today at 07:55 PM Craigr said this in Post #95
I want a query that extracts the last 5 posts from a thread and displays part of it say the first few hundred characters. If possible also displays the posters name and time posted.

here you go:

Craigr 03-30-2003 06:40 PM

Quote:

Today at 08:18 PM Logician said this in Post #96

here you go:

Works great. :D

Thanks once again.
Craig

amykhar 04-22-2003 03:05 PM

I threw this together to satisfy my own curiousity. (Thanks to zzed for a tip that helped me do this).

It's not really a finished hack. It's more of a rough job that lets me see what I want to see. As the table grows, I will manually drop older information as needed.

Run this query:
SQL-query : [Edit] [Create PHP Code]
CREATE TABLE `Google` (
`googleid` TINYINT NOT NULL AUTO_INCREMENT,
`url` VARCHAR( 255 ) NOT NULL ,
PRIMARY KEY ( `googleid` )
);


In global.php Find:

Code:

$header='';
$footer='';

Add After :
Code:

if(strstr($url, "google")) {
  $DB_site->query("INSERT INTO Google VALUES (null, '$url')");
}


OK. Now for the Web Templates part:

Create a new query:

Query name: _google
Query: Select url from Google;
Description: Figure out what people are searching for on Google
No result Text: none
Table Row:<li><a href="??url??">??url??</a></li>


Create a new Web Template:
Template name: Google
Page Count: 0
(You will need to tweak this to your taste. I kept mine bare bones and allow anyone who knows about it to see it) Template:
[cansee]everybody[/cansee]
[options]templatequeryon[/options]
<ol>
$_google
</ol>

Demo:
http://www.eaforums.com/forums/show.php?pg=test

Have fun :)

Logician 04-22-2003 07:14 PM

it is handy, thx for sharing! :)

mzbcarper 05-21-2003 02:48 PM

Hello, i want to include the username on my custom page, how could i manage this ?

greez

mzbcarper

amykhar 05-21-2003 03:43 PM

Bug found in my above post. Make googleid an Int instead of a tinyint.

Amy

Koutaru 05-21-2003 05:59 PM

Quote:

Today at 10:48 AM mzbcarper said this in Post #100
Hello, i want to include the username on my custom page, how could i manage this ?

greez

mzbcarper



ask in the original thread
and check in your admincp or readme. it should be there

glo 08-02-2003 02:19 AM

Hi Logician,

I can see that this thread hasnt been very active since May.

I have installed your new version 2.03 and have 2 questions requiring your assistance.

I hope that from the answers obtained I will be able to contribute to the webquery and template list!

1. this question is similar to Rose's question from 1 year ago.
Objective: When a guest or member who is not logged in, accesses the "account information" page, the page should display (using conditionals) some text about membership benefits . But once they log in then they are given the "edit profile, edit options and edit password" templates from vB but i dont want to use the vB header.

What is the best way to do this?

2. I will think of the 2nd question when we sort out the first one.

Thanks again! Eagerly awaiting your response.

Logician 08-02-2003 09:13 AM

Quote:

Today at 06:19 AM glo said this in Post #103
Hi Logician,

I can see that this thread hasnt been very active since May.

I have installed your new version 2.03 and have 2 questions requiring your assistance.

I hope that from the answers obtained I will be able to contribute to the webquery and template list!

1. this question is similar to Rose's question from 1 year ago.
Objective: When a guest or member who is not logged in, accesses the "account information" page, the page should display (using conditionals) some text about membership benefits . But once they log in then they are given the "edit profile, edit options and edit password" templates from vB but i dont want to use the vB header.

Create a custom header for your webtemplates. Set "Have conditionals" to "YES" for your header.

Then use conditionals to display certain things according to visitor's userid/usergroupid there.

---------------------------------------------------------------
HTML that is showed to both guests and members

[[($bbuserinfo[userid]==0)]]
HTML to show guests only
[[/($bbuserinfo[userid]==0)]]

HTML that is showed to both guests and members

[[($bbuserinfo[userid]>0)]]
HTML to show to members only
[[/($bbuserinfo[userid]>0)]]

HTML that is showed to both guests and members
---------------------------------------------------------------
Then assign this to any webtemplate you like. More examples about conditionals can be found in the hack threads of "Dynamic Templates Hack" and "Dynamic Forum Home Announcement Hack".

glo 08-02-2003 11:30 AM

How is this? Does it look correct?

__________________________________________________ __
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
$nowbrowsing <br><br>

[[($bbuserinfo[usergroupid]>1)]]

<head>
<title>$bbtitle - Update profile</title>
$headinclude
</head>
<body>

<!-- breadcrumb -->
<table cellpadding="2" cellspacing="0" border="0" width="95%" align="center">
<tr>
<td width="100%">
<normalfont><b>&gt;
<a href="usercp.php?s=$session[sessionhash]">User Control Panel For $bbuserinfo[username]</a> &gt;
Edit Profile</b></normalfont></td>
</tr>
</table>
<!-- /breadcrumb -->

<br>
$cpnav
<br>

<center>$coppatext</center>

<form action="member.php" method="post">
<input type="hidden" name="s" value="$session[sessionhash]">

<table cellpadding="0" cellspacing="0" border="0" bgcolor="#0A293E" width="95%" align="center"><tr><td>
<table cellpadding="4" cellspacing="1" border="0" width="100%">
<tr>
<td bgcolor="#336D95" background="https://vborg.vbsupport.ru/images/catagory_backing.gif" colspan="2"><normalfont color="#000000"><b>Edit Profile - $bbuserinfo[username]</b></normalfont></td>
</tr>
<tr>
<td bgcolor="#1D6AA0" colspan="2"><normalfont color="#EEEEFF" class="thtcolor"><b>Registration: Required Information</b></normalfont>
<smallfont color="#EEEEFF" class="thtcolor">All fields are required.</smallfont></td>
</tr>
$parentemail
<tr>
<td bgcolor="#1C5780"><normalfont><b>Email Address:</b></normalfont></td>
<td bgcolor="#1C5780"><normalfont><input type="text" class="bginput" name="email" value="$bbuserinfo[email]" size="30" maxlength="150"></normalfont></td>
</tr>
<tr>
<td bgcolor="#1C5780"><normalfont><b>Confirm Email Address:</b></normalfont></td>
<td bgcolor="#1C5780"><normalfont><input type="text" class="bginput" name="emailconfirm" value="$bbuserinfo[email]" size="30" maxlength="150"></normalfont></td>
</tr>
$customfields_required
<!-- *** -->
<tr>
<td bgcolor="#1D6AA0" colspan="2"><normalfont color="#EEEEFF" class="thtcolor"><b>Optional Information</b></normalfont> <smallfont color="#EEEEFF" class=thtcolor>All information will be viewable by other $bbtitle members.</smallfont></td>
</tr>
<tr>
<td bgcolor="#1C5780"><b><normalfont>Homepage:</normalfont></b></td>
<td bgcolor="#1C5780"><normalfont><input type="text" class="bginput" name="homepage" value="$bbuserinfo[homepage]" size="30" maxlength="200"></normalfont></td>
</tr>
<tr>
<td bgcolor="#13486D"><b><normalfont>ICQ Number:</normalfont></b></td>
<td bgcolor="#13486D"><normalfont><input type="text" class="bginput" name="icq" value="$bbuserinfo[icq]" size="30" maxlength="30"></normalfont></td>
</tr>
<tr bgcolor="#1C5780">
<td><b><normalfont>AOL Instant Messenger Handle:</normalfont></b></td>
<td><normalfont><input type="text" class="bginput" name="aim" value="$bbuserinfo[aim]" size="30" maxlength="30"></normalfont></td>
</tr>
<tr>
<td bgcolor="#13486D"><b><normalfont>Yahoo Messenger Handle:</normalfont></b></td>
<td bgcolor="#13486D"><normalfont><input type="text" class="bginput" name="yahoo" value="$bbuserinfo[yahoo]" size="30" maxlength="30"></normalfont></td>
</tr>
<tr>
<td bgcolor="#1C5780" valign="top"><b><normalfont>Signature:</normalfont></b><br>
<smallfont>Optional signature you may use to appear at bottom of your posts.</smallfont>
<p><smallfont>HTML code is $htmlonoff<br>
<a href="misc.php?s=$session[sessionhash]&action=bbcode">vB Code</A> is $bbcodeonoff<br>
[img] code is $imgcodeonoff<br>
<a href="misc.php?s=$session[sessionhash]&action=showsmilies">Smilies</a> are $smiliesonoff
</smallfont></p></td>
<td bgcolor="#1C5780"><textarea name="signature" rows="6" cols="40">$signature</textarea></td>
</tr>
$birthday
$customtext
<tr>
<td bgcolor="#1D6AA0" colspan="2"><normalfont color="#EEEEFF" class="thtcolor"><b>Additional Information</b></normalfont></td>
</tr>
$customfields
</table>
</td></tr></table>

<br>

<table cellpadding="2" cellspacing="0" border="0" width="95%" align="center">
<tr>
<td align="center"><normalfont>
<input type="hidden" name="action" value="updateprofile">
<input type="submit" class="bginput" name="Submit" value="Submit Modifications" accesskey="s">
<input type="reset" class="bginput" name="Reset" value="Reset Fields">
</normalfont></td>
</tr>
</table>

</form>

$footer

</body>

[[/($bbuserinfo[usergroupid]>1)]]

[[($bbuserinfo[usergroupid]==1)]]

<font face="Verdana, Arial, Helvetica, sans-serif" size="1">
<b>Welcome to GLO-Racing.com!</b><br><br>
If you dont' have an account already, you can create an account online and become a GLO-Racing.com member. Its <b>FREE</b>!<br><br>
When you are become a GLO-Racing.com member, you can <b>access member only</b> pages, be notified of <b>special offers</b> before the public, <b>earn points</b> for <b>prizes</b>, register for <b>competitions</b>, edit your profile, be a part of the <b>GLO Racing Forums</b> and much much more.</p>

Insert images of member only pages (thumbnails only, cometitions page,</p>

We will not disclose your personal information to any 3rd parties. Please read our Privacy Policy for more details.</p>
Note: Once you have completed the registration form, an email will be sent to the email address that you registered with. Your account will not be activated until you visit the link in that email.</p>

Simply click the relevant link at the top of this page to start!
</font>
[[/($bbuserinfo[usergroupid]==1)]]

</html>
__________________________________________________

for a webtemplate?
I have to add the queries too! But they are all exisiting vb queries, so i just need to add them to the webquery list, right?

I have compiled my webquery for this template!
$nowbrowsing $cpnav $bbuserinfo[userid] $bbtitle $headinclude $session[sessionhash] $bbuserinfo[username] $coppatext $parentemail $bbuserinfo[email] $customfields_required $bbuserinfo[homepage] $bbuserinfo[icq] $bbuserinfo[aim] $bbuserinfo[yahoo] $htmlonoff $bbcodeonoff $imgcodeonoff $smiliesonoff $birthday $customtext $customfields $footer $bbuserinfo[usergroupid]

All up 23 queries from my count. Is that too many?
How am i going so far?

glo 08-07-2003 09:14 AM

Logician? Any assistance on this one please?

Logician 08-07-2003 01:00 PM

Quote:

08-02-03 at 03:30 PM glo said this in Post #105
I have to add the queries too! But they are all exisiting vb queries, so i just need to add them to the webquery list, right?

I have compiled my webquery for this template!
$nowbrowsing $cpnav $bbuserinfo[userid] $bbtitle $headinclude $session[sessionhash] $bbuserinfo[username] $coppatext $parentemail $bbuserinfo[email] $customfields_required $bbuserinfo[homepage] $bbuserinfo[icq] $bbuserinfo[aim] $bbuserinfo[yahoo] $htmlonoff $bbcodeonoff $imgcodeonoff $smiliesonoff $birthday $customtext $customfields $footer $bbuserinfo[usergroupid]

All up 23 queries from my count. Is that too many?
How am i going so far?
Some of these are webtemplates variables (eg. $nowbrowsing), some of them are vb variables ($bbuserinfo[userid] $bbtitle $headinclude $session[sessionhash] $bbuserinfo[username]), some of them are vb templates but none of them are webqueries.

Webquery is a different concept which means SQL queries you created with this hack. It has nothing to do with things you mentioned here.

glo 08-07-2003 09:57 PM

ok, in that case i will remove the $nowbrowsing and also ($bbuserinfo[userid] $bbtitle $headinclude $session[sessionhash] $bbuserinfo[username] from the webqueries list and place these into the Outside Variables section in the "edit webtemplate" screen.

Anything else i need to do, to make it work properly?

glo 08-07-2003 10:36 PM

i have removed the all of the variables, and the template still views the same as before, yet there are some parts of the template that i cant get to display.

Basically, my template im creating is a simplified version of the "vb" "editoptions" template without the header (removing header is easy with WT!) but i cant see the cpnav and additional information at the bottom.

Can you guide me please?

Logician 08-08-2003 08:50 AM

Quote:

Today at 02:36 AM glo said this in Post #109
i have removed the all of the variables, and the template still views the same as before, yet there are some parts of the template that i cant get to display.

Basically, my template im creating is a simplified version of the "vb" "editoptions" template without the header (removing header is easy with WT!) but i cant see the cpnav and additional information at the bottom.

Can you guide me please?

You can not display every vb template or vb variable in webtemplates by simply adding its name. Some of the variables or templates are produced by vbulletin by running some codes first. And these codes are embedded inside vb scripts. Webtemplates can not display them by just adding its template/variable name as this codes do not run when you call your webtemplates so variable values become blank.

For instance consider quick jump navigation. It has a template and a variable name but adding its template or variable name in webtemplates would not make it appear in your webtemplates. Because vb first runs a special code for it in every page and these codes forms its variable according to many criteria. Like show private forums if user is a admin etc.

Webtemplates still has a structure for creating such special variables and templates but it is for advanced users only. People who is proficient in PHP can check vbulletin's algorithm for such special variables, adopt its code and use it in the PHPINCLUDE section of webtemplates. Then webtemplates will be able to use such variables too. But this feature is not for novice because it will involve coding.

glo 08-08-2003 08:57 AM

thanks Logician,

I am a novice at the moment, but am eager to learn!

T3MEDIA 03-13-2005 11:02 PM

Looking for a template that shows 5 random users in a nice little neat box.
this is for my bigger template that will have a new member find.
I have it almost done. acutally it IS done. this additon is needed.
so in other words

:smoke: :pirate: :lick: :devious: :speechless:
it would look like that but that would be random users THAT have avatars or profile pictures. whichever is easier.

Icehawk002 10-03-2005 10:58 AM

Wonder if anyone can help I am trying to position two IFRAMES side by side within a webtemplate using the code below (sorry not a coder barely computer literate somedays) the code below correctly places the first IFRAME but the second is pushed to the bottom of the page. ??????


Quote:

<!-- INLINE FRAME -->
<TABLE cellpadding="0" cellspacing="0" border="0" class="iframe"><tr><td>
<IFRAME height="520" name="soundframe" src="window-welcome.htm" width="200" style="position:relative; left:10px; frameborder=0 scrolling="yes"></IFRAME>
</td></tr></table>
<!-- INLINE FRAME -->
<DIV>
<!-- INLINE FRAME -->
<TABLE cellpadding="0" cellspacing="0" border="0" class="iframe"><tr><td>
<IFRAME height="330" name="soundframe" src="../Library/wa2.htm" width="520" style="position:absolute; right:45px; frameborder=2 scrolling="yes"></IFRAME>
</td></tr></table>
<!-- INLINE FRAME -->
Thanks in advance

Logician 10-03-2005 05:10 PM

Quote:

Originally Posted by Icehawk002
Wonder if anyone can help I am trying to position two IFRAMES side by side within a webtemplate using the code below (sorry not a coder barely computer literate somedays) the code below correctly places the first IFRAME but the second is pushed to the bottom of the page. ??????

This is really not related to webtemplates, as it is a pure HTML question but here you go:

PHP Code:

<!-- INLINE FRAME -->
<
TABLE cellpadding="0" cellspacing="0" border="0" class="iframe">
 <
tr>
  <
td valign="top"> <IFRAME height="520" name="soundframe" src="window-welcome.htm" width="200" style="position:relative; left:10px; frameborder=0 scrolling="yes"></IFRAME> 
  </td>
  <td valign="
top"> <IFRAME height="330" name="soundframe" src="../Library/wa2.htm" width="520" style="position:absoluteright:45pxframeborder=2 scrolling="yes"></IFRAME
  </
td>
</
tr></table>
<!-- 
INLINE FRAME --> 


Icehawk002 10-03-2005 07:58 PM

Apologies your right it was a HTML question, however thank you it has helped me complete my webtemplate and I am sure others might benefit so thanks.

Icehawk002 10-14-2005 05:45 PM

I have a dropdown menu in the default template, when dropped this becomes obscured (goes behind) the Iframe above in the body of the template. Any suggestions how I get it to go infront.

probably another html question but might be related to the webtemplates which is why I ask here.

ps this web templates mod is super.

leitel 02-13-2006 07:50 PM

I am building a directory that will connect to vb user table. I am wondering if I can somehow pass a parameter to the webquery to bring up a particular record by pre-setting a variable in your Query PHPInclude Code (Before) section.

For example:

Query:
SELECT name FROM people WHERE id = $nameid ORDER BY name DESC LIMIT 1

PHPInclude:
$nameid = a value i pull off of the address string


I need to dust off my debugger to see what values exist at this point in the runtime. But can someone give me the syntax to pull a parameter value from the URL?
www.noblood.org/forum/view.php?pg=test2&nameid=9999

Thanks! :)

I just tried:

Query:
SELECT name FROM people WHERE id = $nameid ORDER BY name DESC LIMIT 1

PHPInclude:
$nameid = 4

$nameid did not resolve. :( So I take it that the query can not contain php variables?

Logician 02-14-2006 07:24 AM

Quote:

Originally Posted by leitel
I am building a directory that will connect to vb user table. I am wondering if I can somehow pass a parameter to the webquery to bring up a particular record by pre-setting a variable in your Query PHPInclude Code (Before) section.

For example:

Query:
SELECT name FROM people WHERE id = $nameid ORDER BY name DESC LIMIT 1

PHPInclude:
$nameid = a value i pull off of the address string


I need to dust off my debugger to see what values exist at this point in the runtime. But can someone give me the syntax to pull a parameter value from the URL?
www.noblood.org/forum/view.php?pg=test2&nameid=9999

Thanks! :)

I just tried:

Query:
SELECT name FROM people WHERE id = $nameid ORDER BY name DESC LIMIT 1

PHPInclude:
$nameid = 4

$nameid did not resolve. :( So I take it that the query can not contain php variables?

What you try to do sounds doable. However how you do it depends on vb version (hence webtemplate version) so it can help to know this.

Also it is a good idea if you paste your webtemplate/webquery (with its exact phpinclude code) so that we can check how you did it.

leitel 02-14-2006 09:35 AM

Thank you for your responce.

I would like for example to present one record using a WebTemplates page that is based on a single query that receives from the URL the record id.

I am using vB 3.53 and WebTemplates 3.5.x.
Code:


Query:
SELECT name FROM people WHERE id = $nameid ORDER BY name DESC LIMIT 1

PHPInclude:
$nameid = a value i pull off of the address string

Example URL:
www.noblood.org/forum/view.php?pg=test&nameid=9999


Logician 02-14-2006 11:18 AM

Quote:

Originally Posted by leitel
Thank you for your responce.

I would like for example to present one record using a WebTemplates page that is based on a single query that receives from the URL the record id.

I am using vB 3.53 and WebTemplates 3.5.x.
Code:


Query:
SELECT name FROM people WHERE id = $nameid ORDER BY name DESC LIMIT 1

PHPInclude:
$nameid = a value i pull off of the address string

Example URL:
www.noblood.org/forum/view.php?pg=test&nameid=9999


Use this in phpinclude:
PHP Code:

$vbulletin->input->clean_gpc('r''nameid'TYPE_INT);   
$nameid =  $vbulletin->GPC['nameid']; 

More info here:
https://vborg.vbsupport.ru/showpost....3&postcount=93


All times are GMT. The time now is 01:16 AM.

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.01735 seconds
  • Memory Usage 2,000KB
  • 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
  • (4)bbcode_code_printable
  • (4)bbcode_php_printable
  • (27)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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