vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   WebTemplates 3.x: VB Integrated Content Management System (https://vborg.vbsupport.ru/showthread.php?t=76422)

Logician 03-20-2005 07:46 PM

Quote:

Originally Posted by m0nde
Will this hack conflict with my vBadvanced installation?

As stated in FAQ, the answer is no.

Quote:

I got this error after running the MySQL queries:
Please run the query in phpmyadmin. More info in FAQ and installation document.

DanCan 03-20-2005 07:56 PM

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.

DanCan 03-20-2005 07:58 PM

And wow! Just checked the test page. This looks great! Can't wait to use it.

Thanks

m0nde 03-20-2005 09:11 PM

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:

An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax near ';
CREATE TABLE `wt2_queries` (
`qid` int(10) unsigned NOT NULL auto_incremen' at line 19
I really want to try out WebTemplates.

EH-Jay 03-20-2005 11:56 PM

Quote:

Originally Posted by Logician
I don't get your problem exactly. All I'm saying is that IF your webtemplate is "PHP parsed" you can NOT include any header and footer in it, otherwise you'd get PARSE error. (This is also stated in help document). Headers and footers are for "TEXT" or "HTML" parsed webtemplates.

If your webtemplate is already TEXT or HTML parsed but you still get an parse error, then paste the content of your header and webtemplate that gives the error and I'll check.

"Header/Footer Templates:" was what I was talking about. It says in the 2 files "Header/Footer Templates are always HTML parsed."

So? I'm lost :(

Logician 03-21-2005 05:15 AM

Quote:

Originally Posted by m0nde
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:

You gotto install phpmyadmin. It is a free script anyway. Please read the FAQ.

neocorteqz 03-21-2005 06:48 AM

You can also run Queries from the vBull admin CP

Logician 03-21-2005 08:42 AM

Quote:

Originally Posted by neocorteqz
You can also run Queries from the vBull admin CP

No, not for this hack's installation. It involves a long query list which vb admin cp run query tool can not handle, so phpmyadmin is strongly recommended.

m0nde 03-21-2005 06:25 PM

Quote:

Originally Posted by Logician
You gotto install phpmyadmin. It is a free script anyway. Please read the FAQ.

I managed to work through this myself, but you're right, PHPMyAdmin was easy and straight forward to install and made it work.
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:

Izze_de 03-22-2005 12:15 PM

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]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle] $WT_PageName</title>
$headinclude
</head>
<body>
$header
$navbar
$nowbrowsing
<table width="100%" border="0" cellspacing="0" cellpadding="0">
 <tr>
<td width="$vba_options[portal_leftcolwidth]" valign="top">
<if condition="$show['left_column']">
$home[leftblocks]
</if>

  <br>
  </td>
  <td width="20"><input type="image" src="$vboptions[cleargifurl]" width="20" height="1"></td>
  <td valign="top"> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
    <thead>
    <tr>
            <td class="tcat" align="left">&raquo; $WT_PageName</td>
</tr>


 <tr>
  <td class="alt2" align="left">
                        <div class="normalfont">
$includedtemplate
      </div>
  </td>
 </tr>
 <tr>
  <td class="thead" align="left"> Page
      Visitors: <b>$count</b>, Last Visitor was $WT[lastvisitorname]
      at $WT[lastvisitdate]. $WT_Editor_link<br>
      Page Created at <b>$creationdate</b>, Last Modified
      : <b>$lasteditdate</b>.</td>
 </tr>

</thead>
</table>
               
               
                </td>
 </tr>
</table>
 $footer

</body>
</html>

but when i try to view the testpage it says:

Quote:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /path/to/forum/view.php(657) : eval()'d code on line 14
is it possible to include the portal boxes and when, how ?

Thank you.

vulture 03-22-2005 11:45 PM

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?

Buddha 03-24-2005 01:50 PM

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.

Logician 03-24-2005 02:45 PM

Quote:

Originally Posted by Buddha
also, when someone is viewing the page, it shows in Who's Online as an unknown location. is there a way to change that?

You need to install "OPTIONAL STEP 2" for this request.

Buddha 03-24-2005 03:25 PM

my apologies... i misread that to mean something else. completely my fault though.

again, thanks for the great add-on.

bamaster 03-25-2005 01:28 AM

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!

EH-Jay 03-29-2005 11:37 PM

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

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(623) : eval()'d code on line 23

What can I do to fix this? What do I do?

Thanks

Logician 03-30-2005 06:43 AM

Quote:

Originally Posted by EH-Jay
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

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(623) : eval()'d code on line 23

What can I do to fix this? What do I do?

Thanks

Do NOT use VB3 conditionals in webtemplates. If you need to use conditionals you have to use my conditional syntax.

For instance your source code has:
PHP Code:

<if condition="$show['left_column']">
$home[leftblocks]
</if> 

which is in VB3 conditional format.

actolearn 03-30-2005 04:38 PM

i'm still trying to grasp the full potential of this hack....seems wonderful....any screenshots of the admincp? seeing that could help.

Logician 03-30-2005 04:54 PM

Quote:

Originally Posted by actolearn
any screenshots of the admincp? seeing that could help.

here you go.

BigIke 03-31-2005 01:37 AM

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

BigIke 03-31-2005 03:47 PM

hmm.. nevermind. The link pops up in a different window somehow..

ricoche 04-07-2005 04:04 AM

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.

Logician 04-07-2005 06:02 AM

Quote:

Originally Posted by ricoche
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.

Have you checked FAQ?

BigIke 04-08-2005 10:16 PM

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

Logician 04-09-2005 06:41 AM

Quote:

Originally Posted by bringindaruckus
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)..

I appreciate your suggestions.

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:

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.
if you change this line in view.php:

PHP Code:

if ($WT['doaction']=='text') {$includedtemplate=parse_bbcode2($WT['template'],0,1,1,1);} 

as
PHP Code:

if ($WT['doaction']=='text') {$includedtemplate=parse_bbcode2($WT['template'],1,1,1,1);} 

this should do what you wanted.

SVTOA 04-09-2005 12:34 PM

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.

Robert Basil 04-14-2005 08:24 AM

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!

Logician 04-14-2005 11:03 AM

Quote:

Originally Posted by Sportbikeworld
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!

Make a LEFT JOIN in first query:

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

Robert Basil 04-14-2005 11:08 AM

Quote:

Originally Posted by Logician
Make a LEFT JOIN in first query:

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

Thanks for the fast response!

So to pull the info can I just use $WQfield[t.title] and $WQfield[f.title] ?

Logician 04-14-2005 11:10 AM

Quote:

Originally Posted by Sportbikeworld
Thanks for the fast response!

So to pull the info can I just use $WQfield[t.title] and $WQfield[f.title] ?

ok let's change the query like this:

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

Robert Basil 04-14-2005 12:07 PM

Quote:

Originally Posted by Logician
ok let's change the query like this:

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

You have a typo above.

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!

Robert Basil 04-14-2005 12:13 PM

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.

Spinball 04-14-2005 01:57 PM

Quote:

Originally Posted by Logician
I don't get your problem exactly. All I'm saying is that IF your webtemplate is "PHP parsed" you can NOT include any header and footer in it, otherwise you'd get PARSE error. (This is also stated in help document). Headers and footers are for "TEXT" or "HTML" parsed webtemplates.

If your webtemplate is already TEXT or HTML parsed but you still get an parse error, then paste the content of your header and webtemplate that gives the error and I'll check.

So how do you get the header and footer displayed on a page if the template is PHP?
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.

Robert Basil 04-14-2005 07:50 PM

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

Robert Basil 04-15-2005 10:54 PM

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

Marco van Herwaarden 04-16-2005 06:33 AM

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

Spinball 04-16-2005 09:04 AM

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.

Robert Basil 04-16-2005 10:00 AM

Quote:

Originally Posted by MarcoH64
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

Any help you can provide would be great! Thanks!

Robert Basil 04-16-2005 10:02 AM

Quote:

Originally Posted by Spinball
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.

Well, you lost me as soon as you said "nested selects". ;)

I admit I'm way over my head here with mySQL query syntax knowledge.

Spinball 04-17-2005 11:39 AM

Quote:

Originally Posted by Sportbikeworld
Well, you lost me as soon as you said "nested selects". ;)

I admit I'm way over my head here with mySQL query syntax knowledge.

Short term visit the MySQL website, longer term, buy a book. Or go on a course. I have been fortunate enough to have been sent on about 3 SQL courses at Oracle in Reading (UK) by my previous employer and if you make money from your board then taking the time/money to amass some SQL knowledge will be a worthwhile investment.

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
  • Page Generation 0.01817 seconds
  • Memory Usage 1,872KB
  • 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
  • (22)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