![]() |
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:
|
Quote:
Quote:
|
Quote:
Quote:
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. |
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? |
Also, on my site I have the "Welcome back, Username" here. For unregistered members/guests - how would I include a login panel for them?
|
Rose,
Quote:
Quote:
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:
[[($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.. ;) |
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* |
Quote:
|
Quote:
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:
|
Quote:
[[($bbuserinfo[usergroupid]==1)]] Of course closing conditional will be replaced too: [[/($bbuserinfo[usergroupid]==1)]] |
Quote:
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? |
Quote:
Quote:
Quote:
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.. |
Quote:
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:
Quote:
|
Anybody want to share some more queries?
Craig |
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 |
1 Attachment(s)
Quote:
|
Quote:
Thanks once again. Craig |
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=''; Code:
if(strstr($url, "google")) { 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 :) |
it is handy, thx for sharing! :)
|
Hello, i want to include the username on my custom page, how could i manage this ?
greez mzbcarper |
Bug found in my above post. Make googleid an Int instead of a tinyint.
Amy |
Quote:
ask in the original thread and check in your admincp or readme. it should be there |
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. |
Quote:
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". |
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>> <a href="usercp.php?s=$session[sessionhash]">User Control Panel For $bbuserinfo[username]</a> > 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? |
Logician? Any assistance on this one please?
|
Quote:
Webquery is a different concept which means SQL queries you created with this hack. It has nothing to do with things you mentioned here. |
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? |
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? |
Quote:
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. |
thanks Logician,
I am a novice at the moment, but am eager to learn! |
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. |
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:
|
Quote:
PHP Code:
|
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.
|
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. |
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? |
Quote:
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. |
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:
|
Quote:
PHP Code:
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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|