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-11-2012 08:41 AM

Quote:

Originally Posted by ryancooper (Post 2364466)
Does anyone know how to include the latest posts (only found in the post title) of the page your are on?

Example I am browsing a page called Space mountain - I would like to have on that page the last 5 posts that have Space mountain in the title of the post?

I know I can make a web query for just Space Mountain and inclue it but then I would have to have a query for every search term. Is there a way to have it show the $WT_PageName% in the Query?

I did try
Code:

SELECT threadid, title, postusername,postuserid,dateline
FROM " . TABLE_PREFIX . "thread
WHERE taglist LIKE '$WT_PageName%'
ORDER BY dateline DESC
LIMIT 5

and that did not work ;) Thanks!

$WT_PageName variable can be used in WebQueries, I don't see a problem with this.

I believe your query is somehow wrong. Can you run the same query in phpmyadmin and return valid results with it?

There are certain things you need to check. Eg. your WHERE query is checking the keyword in "taglist" field, not title. I'm not sure if this is intentional. Also when you use '$WT_PageName%' instead of "'%$WT_PageName%'" you are querying results that begins with $WT_PageName rather than including.

ryancooper 09-12-2012 01:00 PM

Logician,
Would you able able to post the code to use that will return the latest 5 threads about %$WT_PageName%

I was using tags because I couldnt figure out how to search the title of posts :) LOL

Logician 09-12-2012 01:17 PM

Quote:

Originally Posted by ryancooper (Post 2364783)
Logician,
Would you able able to post the code to use that will return the latest 5 threads about %$WT_PageName%

I was using tags because I couldnt figure out how to search the title of posts :) LOL

I believe this should work:

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

ryancooper 09-12-2012 01:40 PM

AWESOME thanks Again! :D

mathforum 09-16-2012 02:53 AM

Any comments on highlighting the proper navbar tab on custom pages?

vBThemer 09-16-2012 03:53 AM

Thanks for addon. its easy & handy to add new pages.
I have installed this & got only 1 navtab to work correctly by using Tab Script(s) "view" & for other 2 tabs I used "Append 'tabid' to URL" & this stays highlightend.

ryancooper 09-17-2012 11:58 PM

Logican Can I use t he Webtemplate name in the Result Prefix Code.
I would like to put latest topics on $WT_PageName But it does not seem to pick it up?

ryancooper 09-19-2012 01:15 PM

I am also trying to exclude a series of forum ID's I tried added:
t.forumid to the select

then adding:

AND t.forumid NOT IN '36,37,77'

But it tosses a error

Logician 09-20-2012 01:55 PM

Quote:

Originally Posted by ryancooper (Post 2366669)
I am also trying to exclude a series of forum ID's I tried added:
t.forumid to the select

then adding:

AND t.forumid NOT IN '36,37,77'

But it tosses a error

Try:

AND t.forumid NOT IN (36,37,77)

ryancooper 09-25-2012 08:38 PM

nope they still show...


All times are GMT. The time now is 12:00 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.01236 seconds
  • Memory Usage 1,740KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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