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)

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.


All times are GMT. The time now is 11:34 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.01362 seconds
  • Memory Usage 1,792KB
  • 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_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
  • (10)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