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


All times are GMT. The time now is 09:15 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.01547 seconds
  • Memory Usage 1,754KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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