![]() |
Quote:
Quote:
|
I did, but now I learned how to do it in the way you preferred, and now it works. - and I actually learned how to run a SQL query.
Thanks. |
And wow! Just checked the test page. This looks great! Can't wait to use it.
Thanks |
I hadn't read the FAQ properly. Thanks for the quick reply.
I don't have phpmyadmin installed to run the sql query. So I added my account into the appropriate line in config.php and ran the query from Admin CP | Import & Maintenance | Execute SQL Query After doing this, I received the errors below: Quote:
|
Quote:
So? I'm lost :( |
Quote:
|
You can also run Queries from the vBull admin CP
|
Quote:
|
Quote:
I did have some problems with pathing because I'm running all this on Windows 2003 SBS. But i changed the Windows pathing scheme on line 29 of webtemplate.php from ..\ to .\ and it worked fine. All said and done, WebTemplates is a very good add-on and I can see myself using it for various custom pages. I would like to see you create an auto-install script, Logician, which will place all the files automatically and even execute the query automatically. This would make things simpler, even though the install is fairly straight forward. Again, thank you very much for your help and for an exellent piece of work. :up: |
hi,
i am trying to create a new theme based on the "Two Column Theme". i want to insert the vbadvanced portal left column instead of the stats. code is following: Code:
$stylevar[htmldoctype] Quote:
Thank you. |
Could I use webtemplates to integrate an rss news feed?
So when a user click on a rss news feed, it pulls the content from the news site and displays it in a page generated by webtemplates? |
installed.
exactly what i needed... very very nice work done. thank you very much for this addon. i've got it setup to show X posts from XX forum right now, which was simple to setup. i'm wondering if anyone could tell me how to set it up that the poster's avatar appears too. thanks. edit also, when someone is viewing the page, it shows in Who's Online as an unknown location. is there a way to change that? thank you. |
Quote:
|
my apologies... i misread that to mean something else. completely my fault though.
again, thanks for the great add-on. |
Can someone tell me if WebTemplates can do this?
I have a script, similar to a user log/diary, which I'd like to give each of my users... essentially link to the user table. I need a way to run this script, query a database with stats/text, and display results. The script will need to be as secure as the user session, meaning they have to be logged in to use it and cannot view other people's log/diary. Can WebTemplates allow me to run a php/mysql script inside the vB skin and tap into the vB user/security? Many thanks in advance! |
Logican can you help me? All I did was I copied the coding from my forums' header template and pasted it into the header that came with the installation of this hack.
On the top of the basic page, I'm getting this error: Code:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/deathleg/public_html/forums/view.php(617) : eval()'d code on line 20 Thanks |
Quote:
For instance your source code has: PHP Code:
|
i'm still trying to grasp the full potential of this hack....seems wonderful....any screenshots of the admincp? seeing that could help.
|
Quote:
|
If I have an URL whose target I would like to ="blank", how would I do that if my page is parsed in text mode? Thanks
|
hmm.. nevermind. The link pops up in a different window somehow..
|
How search engine friendly is this? Let's say you write articles or tutorials using this template system. Would this get spidered? I know lots of text the regular threads in vb will get picked up, but I am not sure if a full blown article in webtemplates will get spidered. Just wondering how SEO friendly this is.
Thanks very much. |
Quote:
|
Logician are you considering improving this hack? It is definetely my favorite out of all hacks released here. If you were, I have some ideas maybe to help you (just suggestions)..
a.) If there is a way, to parse pages as text and html? For example, on one of my pages I wanted to create a table, but also use the WYSIWYG editor below the table. This would be cool if possible. b.) Polls in pages would also be sick c.) Pages able to be searched from forum search I know that coding is a hard job, because I am trying to learn PHP right now, and I'm stuck on like page 4 lol, so if you've got other priorities, I know the community and I would understand. Thanks for an awesome hack |
Quote:
I agree that this hack has a lot of potential to be improved and I'd like to improve it. However my time that I can spend for my vb.org hacks are very limited and unfortunately I don't see a chance to improve this hack in the near future. As a matter of fact it even took me a year to port it to VB3 and I have other pending hacks to port before concentrating into webtemplates. Sorry about it. Quote:
PHP Code:
PHP Code:
|
Outstanding work. No question.
In testing, there is no conflict of any kind with regard to using other portal software such as VBA. If you get creative with this add-on, there's a lot you can do with it. Example- you could use this for articles and such; with a more customizable format. You can index them by creating a new "forum" called "Articles" and then make the webtemplates into links. One suggestion I would add is if you have a board with multiple stylesets, you might also want to install ZeroTolerance's "Copy Templates from one style to another" hack. Then you can copy the webtemplates required when this is first installed to all your styles very quickly. Anyway, this is great work you have done here Logician. |
How do I use a webquery to query two different tables?
I want to include the forum's name in the last post header. I tried: SELECT t.threadid, t.title, t.firstpostid, t.lastpost, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext FROM " . TABLE_PREFIX . "thread t LEFT JOIN " . TABLE_PREFIX . "post p ON p.postid = t.firstpostid WHERE t.forumid In(108,109) AND t.open = '1' AND t.visible = '1' ORDER BY t.dateline DESC LIMIT 0 , 10 SELECT forumid, title, description, displayorder FROM " . TABLE_PREFIX . "forum WHERE forumid In(108,109) ORDER BY title ASC LIMIT 100 But it did not work. And even if I do get both query's to work when I output them in the Query Results Row both Query's assign a value to the $WQfield[title] variable. Any ideas how to get both query's to work and assign them the "title" variable to different names? Thanks in advance, this is a great hack! |
Quote:
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, f.title, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext FROM thread t LEFT JOIN post p ON p.postid = t.firstpostid LEFT JOIN forum f ON f.forumid = t.forumidpostid WHERE t.forumid IN ( 108, 109 ) AND t.open = '1' AND t.visible = '1' ORDER BY t.dateline DESC LIMIT 0 , 10 |
Quote:
So to pull the info can I just use $WQfield[t.title] and $WQfield[f.title] ? |
Quote:
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, f.title as forumtitle, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext FROM thread t LEFT JOIN post p ON p.postid = t.firstpostid LEFT JOIN forum f ON f.forumid = t.forumidpostid WHERE t.forumid IN ( 108, 109 ) AND t.open = '1' AND t.visible = '1' ORDER BY t.dateline DESC LIMIT 0 , 10 now $WQfield[title] gives you thread title and $WQfield[forumtitle] gives you forum title. ;) |
Quote:
LEFT JOIN forum f ON f.forumid = t.forumidpostid Should be: LEFT JOIN forum f ON f.forumid = t.forumid After fixing the typo it works great, thanks! |
Here is how I am using your script. Everything on the page is pulled from the database using your script (except for the racing map)
http://www.pocketbikeplanet.com/view.php?pg=racing I'm also using it for other areas of the site as well. I've been a VB admin for over 4 years now and this is by far my favorite script. :) P.S. To others using this script, please don't send me PM's or Email's for help. Post you questions in this thread and I'll try and help. |
Quote:
I have created a template which does a standard search of a database and displays the results. Problem is that there is no header and footer like there is with HTML pages. |
How do I tell the code below to show the last 3 posts from each forum and sort them by forum?
This is what I have so far... SELECT t.threadid, t.title, t.firstpostid, t.lastpost, f.title as forumtitle, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext, t.iconid, t.forumid FROM thread t LEFT JOIN post p ON p.postid = t.firstpostid LEFT JOIN forum f ON f.forumid = t.forumid WHERE t.forumid IN ( 19, 116 ) AND t.open = '1' AND t.visible = '1' ORDER BY forumtitle DESC LIMIT 0 , 3 |
Just an update on my progress...
I tried using the code: SELECT t.threadid, t.title, t.firstpostid, t.lastpost, f.title as forumtitle, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext, t.iconid, t.forumid FROM thread t LEFT JOIN post p ON p.postid = t.firstpostid LEFT JOIN forum f ON f.forumid = t.forumid WHERE t.forumid IN ( 19, 116 ) AND t.open = '1' AND t.visible = '1' GROUP BY f.title ORDER BY forumtitle DESC LIMIT 0 , 3 The code above does two things that confuse me. (Keep in mind I am a very novice mySQL guy, so I am easily confused) ;) #1. It only grabs one thread from each forum. (2 threads total on the page even though the limit is set to 3) #2. The thread that it grabs is the oldest thread, not the newest one. I've tried so many different query's I'm about ready to pull my hair out. Any ideas Logician?? |
This is an extreme difficult thing to do in just 1 query. I have seen your other post about this also, but didn't have a brainwave for a solution yet. Maybe when i wake up. :D
|
You're only getting two rows in your result because your are grouping by forum and you are selecting from 2 forums.
I don't have a quick solution either. But I would start looking at nested selects, maybe. |
Quote:
|
Quote:
I admit I'm way over my head here with mySQL query syntax knowledge. |
Quote:
Logician - any help on my question above, please? |
All times are GMT. The time now is 04:20 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:
|