vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Portal Software - WebTemplates 4.x: VB Integrated CMS (Content Management System) (https://vborg.vbsupport.ru/showthread.php?t=250202)

Logician 09-26-2012 08:39 AM

Quote:

Originally Posted by ryancooper (Post 2368526)
nope they still show...

Please post your exact webquery.

ryancooper 09-26-2012 11:43 AM

Code:

SELECT t.threadid, t.title, t.firstpostid, t.lastpost, t.replycount, t.forumid, 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
AND t.open = '1'
AND t.visible = '1'
AND t.forumid NOT IN (36,37,77,173,172)
ORDER BY t.dateline DESC
LIMIT 0 , 10


Logician 09-26-2012 02:48 PM

Quote:

Originally Posted by ryancooper (Post 2368667)
Code:

SELECT t.threadid, t.title, t.firstpostid, t.lastpost, t.replycount, t.forumid, 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
AND t.open = '1'
AND t.visible = '1'
AND t.forumid NOT IN (36,37,77,173,172)
ORDER BY t.dateline DESC
LIMIT 0 , 10


Your SQL query is wrong (missing WHERE)
Code:

SELECT t.threadid, t.title, t.firstpostid, t.lastpost,  t.replycount, t.forumid, 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.open = '1'
AND t.visible = '1'
AND t.forumid NOT IN (36,37,77,173,172)
ORDER BY t.dateline DESC
LIMIT 0 , 10


ryancooper 09-26-2012 03:49 PM

Yep that did it. That's what I get for trying to adjust your code. Thanks.

Is there any way to get the page name in the Return Query Result I tried adding the $WT_PageName but it didn't show.

Logician 09-27-2012 05:23 AM

Quote:

Originally Posted by ryancooper (Post 2368753)
Yep that did it. That's what I get for trying to adjust your code. Thanks.

Is there any way to get the page name in the Return Query Result I tried adding the $WT_PageName but it didn't show.

$WT_PageName variable is parsed IF it is inside "Query Result Row" but not in "Result Prefix Code" or in "Result Affix Code".

If you need this feature, you need to hack view.php, find:
PHP Code:

$$WT_variable_name $WTWQ['prefixcode'] . $birikenrow $WTWQ['affixcode']; 

before that add:
PHP Code:

                                        $WTWQ['prefixcode'] = str_replace('$WT_PageName',$WT_PageName,$WTWQ['prefixcode'] );
                                        
$WTWQ['affixcode'] = str_replace('$WT_PageName',$WT_PageName,$WTWQ['affixcode'] ); 

There are 2 instances of this code, you need to replace both.

KatieG 10-06-2012 06:45 PM

Is it possible to display the current months birthdays

ryancooper 10-10-2012 01:14 PM

Logican,
What would the query be to show the latest 5 SIMILAR THREADS about a page title?

Ryan

Logician 10-11-2012 12:46 PM

Quote:

Originally Posted by ryancooper (Post 2372014)
Logican,
What would the query be to show the latest 5 SIMILAR THREADS about a page title?

Ryan

SELECT thread.threadid, thread.title,
MATCH (thread.title) AGAINST ('$pg') AS score
FROM thread AS thread
WHERE MATCH (thread.title) AGAINST ('$pg')
AND thread.open =1
AND thread.visible =1
ORDER BY score DESC
LIMIT 10

Logician 10-11-2012 12:50 PM

Quote:

Originally Posted by KatieG (Post 2371239)
Is it possible to display the current months birthdays

First you need to assign a variable in "Query PHPInclude Code" of your webquery like:

PHP Code:

$thismonth_is date("m"); 

Then this query should work:
SELECT userid, username, birthday
FROM user
WHERE birthday LIKE '$thismonth_is-%'
LIMIT 100

ryancooper 10-12-2012 05:49 PM

Quote:

Originally Posted by Logician (Post 2372283)
SELECT thread.threadid, thread.title,
MATCH (thread.title) AGAINST ('$pg') AS score
FROM thread AS thread
WHERE MATCH (thread.title) AGAINST ('$pg')
AND thread.open =1
AND thread.visible =1
ORDER BY score DESC
LIMIT 10


Get an error with this:

Can't find FULLTEXT index matching the column list

Logician 10-13-2012 12:57 PM

Quote:

Originally Posted by ryancooper (Post 2372577)
Get an error with this:

Can't find FULLTEXT index matching the column list

This query works on 3.x structure but apparently it is not possible to do this with one query in vb 4.x due to db changes

FlyingRon 10-24-2012 07:41 PM

I've inherited an existing vB/WebTemplates installation. The files installed seem to be identical to the 4.0.1 I downloaded. The TEXT and HTML webtemplates when run display the header and footers (and even insert the edit this page link if that is allowed) but the actual contents of the template do not appear in the output. The webquery used also is executed.

If I use the PHP type, then I get output that I specifically print (but no headers or footers).

Pretty much behave the same if I use the test ones, old ones we had lying around, or attempt to generate new ones.

Any ideas?

Logician 10-25-2012 07:50 AM

Quote:

Originally Posted by FlyingRon (Post 2375722)
I've inherited an existing vB/WebTemplates installation. The files installed seem to be identical to the 4.0.1 I downloaded. The TEXT and HTML webtemplates when run display the header and footers (and even insert the edit this page link if that is allowed) but the actual contents of the template do not appear in the output. The webquery used also is executed.

If I use the PHP type, then I get output that I specifically print (but no headers or footers).

Pretty much behave the same if I use the test ones, old ones we had lying around, or attempt to generate new ones.

Any ideas?

Edit the webtemplate you have this problem and check which theme its using. (In the section that says "Using a Theme?").

Then edit that theme (eg. Two Column Theme) and make sure it has this variable in it:
{includedtemplate}

If it does, try disabling all other pluggins/products/hacks but webtemplates and see if this solve the problem (in case another hack is clashing with WT).

If this also does not solve the problem, give me admin cp/ftp access to your board and I can check.

FlyingRon 10-28-2012 08:23 PM

Thanks, Log....putting the includedtemplate into the style fixed it.

Christos Teriakis 11-20-2012 03:54 PM

Hello,

Seems to be very useful addon. Can someone tell me if it supports CMS widgers or Forum blocks? Or do I need to build my own?

Thank you
Chris

Naijasite 12-30-2012 11:39 PM

best page creator

Naijasite 01-04-2013 08:01 PM

Please how do i make all the Template to be edited by WYSIWYG?

ged 01-04-2013 09:53 PM

Hi, first of all, I'd like to say I've searched the entire topic to prevent double posting same problem. :)

I'm trying to modify webquery WQ_lastxthreadfromforumy only to show thread title's first 20 characters:

PHP Code:

SELECT threadidLEFT(title20), dateline
FROM 
" . TABLE_PREFIX . "thread 
WHERE sticky
=AND visible=AND forumid=6
ORDER BY dateline DESC
LIMIT 5 

Can you tell me what I did wrong? :)

Thank you very much.

Logician 01-04-2013 10:21 PM

Quote:

Originally Posted by ged (Post 2394776)
Hi, first of all, I'd like to say I've searched the entire topic to prevent double posting same problem. :)

I'm trying to modify webquery WQ_lastxthreadfromforumy only to show thread title's first 20 characters:

PHP Code:

SELECT threadidLEFT(title20), dateline
FROM 
" . TABLE_PREFIX . "thread 
WHERE sticky
=AND visible=AND forumid=6
ORDER BY dateline DESC
LIMIT 5 

Can you tell me what I did wrong? :)

Thank you very much.

I believe this should work:

SELECT threadid, LEFT(title, 20) as title, dateline
FROM thread
WHERE sticky=0 AND visible=1 AND forumid=6
ORDER BY dateline DESC
LIMIT 5

ged 01-04-2013 10:26 PM

Quote:

Originally Posted by Logician (Post 2394782)
I believe this should work:

SELECT threadid, LEFT(title, 20) as title, dateline
FROM thread
WHERE sticky=0 AND visible=1 AND forumid=6
ORDER BY dateline DESC
LIMIT 5

Thank you very much, unbelievable support speed! :)

Logician 01-05-2013 08:29 AM

Quote:

Originally Posted by Naijafinder (Post 2394741)
Please how do i make all the Template to be edited by WYSIWYG?

WYSIWYG editor applies to TEXT Webtemplates only. This is for technical reasons. Vb editor may convert special chacters like (< > & " ') so it is not possible to use it with PHP or HTML webtemplates.

mfowler70 01-09-2013 07:40 PM

Installed on 4.2.0 PL 3 and get the following at the top of the page when viewing any of the sample templates:

Deprecated: Assigning the return value of new by reference is deprecated in /home/xxx/xxx/board/view.php on line 787

Deprecated: Assigning the return value of new by reference is deprecated in /home/xxx/xxx/board/view.php on line 916

mfowler70 01-09-2013 07:47 PM

Nevermind. I did the same thing Darth did here and the problem is now solved.

Great mod!

bradleyj 01-11-2013 04:42 PM

I was wondering do I have to link each page individually or is their like one page I link to and it shows all of the content I wasnt sure if that was addressed in the information giving to install. If it is im too blind to see it apparently. Could you direct me in the right direction or tell me the info please..

Thank you for your hard work btw you always bring good mods

Logician 01-11-2013 05:39 PM

Quote:

Originally Posted by bradleyj (Post 2396233)
I was wondering do I have to link each page individually or is their like one page I link to and it shows all of the content I wasnt sure if that was addressed in the information giving to install. If it is im too blind to see it apparently. Could you direct me in the right direction or tell me the info please..

Thank you for your hard work btw you always bring good mods

By default you create a webtemplate and then link it individually in any page you like.

However in the test installation, I created a demo webtemplate (theme named Site Information Pages Template) which automatically groups certain webtemplates and provide a navigation bar for all of them. You can check this demo if you want to group and link certain webtemplates together.

deadlySniper 02-16-2013 10:36 PM

I am having issues where the themes are not adopting my default themes layout.
http://ptheroes.com/forum/view.php?pg=test

hugh_ 02-17-2013 03:18 AM

Is it possible to reference pages generated by this mod using THIS_SCRIPT ==?

Thanks.

Logician 02-17-2013 08:42 AM

Quote:

Originally Posted by hugh_ (Post 2404715)
Is it possible to reference pages generated by this mod using THIS_SCRIPT ==?

Thanks.

Not individual webtemplates but webtemplates in general is possible with THIS_SCRIPT == 'view'

hugh_ 02-17-2013 07:52 PM

I also need to reference a template with the scriptname, what should I use?

Thanks!

Logician 02-17-2013 08:04 PM

Quote:

Originally Posted by hugh_ (Post 2404831)
I also need to reference a template with the scriptname, what should I use?

Thanks!

Please read message id 222, 223, 224 in the thread:
https://vborg.vbsupport.ru/showpost....&postcount=223

hugh_ 02-18-2013 06:22 AM

Thank you. This is very useful.

haze108 03-02-2013 07:46 PM

thank you so much !

selwonk 04-24-2013 11:28 AM

I've just installed WebTemplates on a new forum. I used it very successfully on a forum I sold a few years ago and, IMHO, it remains far and away the best CMS mod available for vBulletin.

One slight problem I'm experiencing is with table styling. It's possible I solved this when I used it before, but I can't get it to work now.

The rendered HTML table looks like this:
Code:

<table cellspacing="5" cellpadding="5" border="1">
  <thead>
    <tr>
      <th>Username</th>
      <th>No. of referrals</th>
    </tr>
  </thead>
  <tbody><tr>
    <td>Prof Pat Pending</td>
    <td>3</td>
  </tr><tr>
    <td>Raven</td>
    <td>1</td>
  </tr><tr>
    <td>Water Cooled</td>
    <td>1</td>
  </tr></tbody>
</table>

The border is rendered correctly, but:

a) the TH attribute does not render as bold;
b) the cellpadding is ignored;
c) the cellspacing is ignored.

Whilst I appreciate that the general consensus is to avoid TABLE tags and replace with DIVs, this is tabular data so perfectly suited to a TABLE.

Are there vBulletin CSS table classes that I've overlooked which might help me to render my tables in a suitably vBulletinesque way?

Thanks in advance!

selwonk 04-24-2013 11:44 AM

Ok.

I hadn't considered checking the WebTemplate themes. :rolleyes:

If anybody is looking to apply custom styling to elements within WebTemplates pages, add a new CSS block before </head> in your selected theme and set customisation there. :)

Logician 04-24-2013 03:26 PM

Quote:

Originally Posted by selwonk (Post 2418243)
Ok.

I hadn't considered checking the WebTemplate themes. :rolleyes:

If anybody is looking to apply custom styling to elements within WebTemplates pages, add a new CSS block before </head> in your selected theme and set customisation there. :)

Alternatively you can use plain in-line CSS to design any HTML elements.

Eg.
<th style="font-weight:bold; color:#000099">Username</th>

Webtemplates does not "touch" your styling actually. Its vb's style sheet that applies to any webtemplate content.

EricGT 05-26-2013 04:52 PM

I love this mod. It would be great if each page template could pass a unique 'THIS_SCRIPT' variable though. I have several WebTemplate pages that each have their own navigation tab. Due to the fact that the same script generates all of them, only one of these tabs can be the 'Selected tab'' when it is clicked, allowing it to have a different color title text and to show a submenu. I worked around this by hacking the functions_navigation.php file, but it would be great to have this addressed within the mod.

Thanks for a great system. Even with a v4.2.1 CMS install, there is still a real need for the abilities this mod provides.

EricGT 05-30-2013 02:15 PM

Quote:

Originally Posted by EricGT (Post 2424328)
I love this mod. It would be great if each page template could pass a unique 'THIS_SCRIPT' variable though. I have several WebTemplate pages that each have their own navigation tab. Due to the fact that the same script generates all of them, only one of these tabs can be the 'Selected tab'' when it is clicked, allowing it to have a different color title text and to show a submenu. I worked around this by hacking the functions_navigation.php file, but it would be great to have this addressed within the mod.

Thanks for a great system. Even with a v4.2.1 CMS install, there is still a real need for the abilities this mod provides.

After I posted the above comments, I looked through this thread and found the navigation tab issue brought up over and over, with no satisfactory answer. I think it is pretty important to be able to have more than one WebTemplate-generated page linked to in the navigation bar and still have the 'Selected' function of the nav tabs work. I'm not sure why something this fundamental wasn't addressed long ago.

The answer was a simple one. I put a conditional statement above the line where the 'THIS_SCRIPT' constant was defined. It takes the pg= value and assigns it as the THIS_SCRIPT constant.

Drawing from something Logician did, I took it a step further and looked for an underscore in the pg= value. If one was found, the text to the left of the underscore and the underscore itself becomes the THIS_SCRIPT value. This way, if there are a large number of submenu items for a WebTemplates-generated page, all of the sub-pages can highlight the correct navigation tab if the same prefix is used in their template names, without having to list each of their THIS_SCRIPT values in the navigation tabs admin area. That variable only allows 30 characters of data, so that capacity could quickly become exhausted.

In the canned templates installed with this mod, every template that used the Site Information Pages Template theme has a template name that starts with 'info_'. With this naming schema, every Webtemplates-generated page that used that prefix would highlight the same navigation tab using my mod to this mod, if the value 'info_' was added as the Tab Script(s) value for that tab.

Anyway, I am a little embarrassed to share the code I used. I am a PERL programmer that is new to PHP and I couldn't get the Regex conditionals to function for me cleanly in PHP, so the code is a little sloppy. It works great though. In the view.php file, replace the
PHP Code:

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT''view'); 

with the code below.

PHP Code:

// #################### DEFINE IMPORTANT CONSTANTS #######################

if (preg_match('/view\.php/i'$_SERVER['REQUEST_URI'])) {
   
$SelectResult preg_split'/=/'$_SERVER['REQUEST_URI'] );
   
$SelectVariable $SelectResult[1];
   if (
preg_match('/_/i'$SelectVariable)) {
      
$SelectResult2 preg_split'/_/'$SelectVariable );
      
$SelectVariable $SelectResult2[0] . '_';
   }
} else {
      
$SelectVariable 'view';
}        
define('THIS_SCRIPT'$SelectVariable); 

The THIS_SCRIPT value will then be whatever you named a given template, unless your template name has an underscore '_' in it. Then, it will be all of the name left of the underscore and the underscore itself. I left the underscore in there to prevent any accidental matches with other names. 'Info', for instance, might get used in a variable name that did not start with 'info_'.

I hope this info helps. If you find this helpful and can clean up my See-Spot-Run Regex's in my code, I'd appreciate it if you could post the cleaned up code here, so I can see what I was doing wrong. I had to use the two preg_split commands because I couldn't pull the relevant data out of the string in the conditional matches. This is really easy in PERL. I suspect it is in PHP as well. I just got tired of trying to make it work. Thanks and thanks again to Logician, for a wonderful mod.

brandon515 06-12-2013 05:01 PM

Is there a way to create a web query that would list the last x number of threads for a forum for a specific date?

Thanks,
Brandon

Logician 06-13-2013 07:14 AM

Quote:

Originally Posted by brandon515 (Post 2427710)
Is there a way to create a web query that would list the last x number of threads for a forum for a specific date?

Thanks,
Brandon

Its possible. You can customize default webqueries named "$WQ_last10threadfromforum2" OR "$WQ_last5threadcontentsfromforum2".

Eg.
Code:

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 = '2'
AND t.open = '1'
AND t.visible = '1'
ORDER BY t.dateline DESC
LIMIT 0 , 5

can become:
Code:

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 = '2' AND t.dateline < UNIX_TIMESTAMP('2010-03-27 03:00:00')
AND t.open = '1'
AND t.visible = '1'
ORDER BY t.dateline DESC
LIMIT 0 , 5

OR

Code:

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 = '2' AND t.dateline < UNIX_TIMESTAMP('2010-03-27 03:00:00') AND t.dateline > UNIX_TIMESTAMP('2010-01-01 03:00:00')
AND t.open = '1'
AND t.visible = '1'
ORDER BY t.dateline DESC
LIMIT 0 , 5


Muhammad Rahman 07-11-2013 03:57 AM

try install in vB 4.2.1 ,,
but give error .
HTML Code:

Deprecated: Assigning the return value of new by reference is deprecated in D:\xampp\htdocs\diskus\view.php on line 787

Deprecated: Assigning the return value of new by reference is deprecated in D:\xampp\htdocs\diskus\view.php on line 916

anyone can help ??


All times are GMT. The time now is 10:51 PM.

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.01789 seconds
  • Memory Usage 1,879KB
  • 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
  • (7)bbcode_code_printable
  • (1)bbcode_html_printable
  • (7)bbcode_php_printable
  • (17)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