vb.org Archive

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

digitalSite 01-21-2006 08:31 AM

Quote:

Originally Posted by Logician
You are suppose to get last 5 in that forum. I get 5 in my test forum. Can it be because you have just 1 thread in that forum?

Ha! This is true! I do only have one post in this forum...I guess my question should be, how do I list threads from ALL forums? Would I have to add every forum here

WHERE t.forumid = '1','2','3', etc.? Thanks!

I tried removing this WHERE t.forumid = (because I want from ALL forums) and replaced it with WHERE t.open = '1' AND t.visible = '1', but then the titles don't get limited and it posts the entire title.

OMG, I'm having a hard time with this...I noticed that when I run your code, it cuts the title to the limit you specify, but when I copy/paste your code into my webtemplate, it diplays the number of posts correctly, but doesn't cut off the title...any ideas why yours works and mine doesn't?

Logician 01-21-2006 08:46 AM

Quote:

Originally Posted by digitalSite
Ha! This is true! I do only have one post in this forum...I guess my question should be, how do I list threads from ALL forums? Would I have to add every forum here

WHERE t.forum = '1','2','3', etc.? Thanks!

I tried removing this WHERE t.forum = (because I want from ALL forums) and replaced it with WHERE t.open = '1' AND t.visible = '1', but then the titles don't get limited and it posts the entire title.

Your WHERE close is right if you want to pull from all forums.

If you want to restrict title, you need to apply the left() to the title section too:

SELECT t.threadid, LEFT(t.title, 10) as title, t.firstpostid, t.lastpost, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, LEFT(p.pagetext, 10) as 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'
ORDER BY t.dateline DESC
LIMIT 0 , 5

digitalSite 01-21-2006 09:09 AM

Quote:

Originally Posted by Logician
Your WHERE close is right if you want to pull from all forums.

If you want to restrict title, you need to apply the left() to the title section too:

SELECT t.threadid, LEFT(t.title, 10) as title, t.firstpostid, t.lastpost, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, LEFT(p.pagetext, 10) as 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'
ORDER BY t.dateline DESC
LIMIT 0 , 5

YEY! This works PERFECTLY! Thank you very much Logician, you're the best!!! (Doing the running man and dancing around the house now...)

For a look at my site, here is what it looks like now (my site is still under construction): http://www.naturalbeautycafe.net/

THANKS!

Logician 01-21-2006 09:16 AM

Quote:

Originally Posted by digitalSite
YEY! This works PERFECTLY! Thank you very much Logician, you're the best!!! (Doing the running man and dancing around the house now...)

For a look at my site, here is what it looks like now (my site is still under construction): http://www.naturalbeautycafe.net/

THANKS!

Glad it worked. Added your site to the demo webtemplates in the first post. I must also tell it to my wife who might be interested being a member ;)

digitalSite 01-21-2006 09:31 AM

Quote:

Originally Posted by Logician
Glad it worked. Added your site to the demo webtemplates in the first post. I must also tell it to my wife who might be interested being a member ;)

Great! No problem! I couldn't find a place online for those interested in all natural products, so I decided to create a community online :) :banana:

htscpl 01-22-2006 03:43 PM

Thanks I've been looking for this. Just upgraded from vb 3.0.11. Lost the webtemplets. ** installs **
H :D

Logician 01-22-2006 06:50 PM

Quote:

Originally Posted by htscpl
Thanks I've been looking for this. Just upgraded from vb 3.0.11. Lost the webtemplets. ** installs **
H :D

Export script should export your old webtemplates for you? You can run it even now if you didnt manually deleted old wt tables.

nitro 01-22-2006 09:05 PM

Its most strange, its only swapping IMG bb tags for URL= tags on my test install. I cannot replicate it live either. I decided to go for it anyway as this by all accounts is a long standing mod, so if its not happening to anyone else it must be some wierd setting somewhere making it happen. :)

I thought perhaps it was a style issue as I havent updated all the styles on my dev box but I've pretty much ruled that out aswell, it does do it in vb's default style which is untouched.

One comment the page title seems to not be editable in the front end only in CP. Might be nice to have some inline stuff on this mod for bits like that.

ammarcom004 01-22-2006 09:15 PM

thanks for this hack

DaFire 01-23-2006 03:13 PM

Hmm.. I'd like to allow certain usergroups to edit pages, which already works great with a few flaws. On my board with about 500 users I have only one admin beside me.. there are several sections with a own leader group but no access to control panel.

1. the editors should be able to toggle the draft flag and should be able to see the page in draft

2. the editors should be able to change the view permission.

Ideally I only create the page, set the allowed webquerys and let the editors do the rest. Even better if I could allow them to create pages themself, but without any possibility to add php code or include files or stuff like that :)


All times are GMT. The time now is 04:05 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.01779 seconds
  • Memory Usage 1,746KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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