![]() |
Quote:
Thank you this is a most important modifcation! Installed and Nominated!:up: |
Quote:
Quote:
For usergroups you'd do something like this: PHP Code:
|
Quote:
The mod is important because the CMS lacks basic needed functionality. It needs to be able to show content for specific user groups without blocking the page and displaying a no permissions screen. However now I can not get the users or guest to function and it just displays empty box. Not sure why. Can you confirm if you are able to display content or not for specific user groups or guest??? Many thanks!!! |
Are you changing the 1, 2, 3 to match what usergroup id numbers you need?
|
Hi,
Yes I have tried changing to user group ideas and cannot get the guest to work either. Widget displays normally with content until I add the additonal code to display to certain groups and then the box is empty. |
Quote:
For those wondering I handled spooky' request privately. It seems that regardless of the conditional statement the widget block will display with blank content. Usergroup viewing permissions for widgets seem like another obvious function that is lacking in the vbCMS. :( Updated to 1.6 - 4.0.2 started inserting [ATTACH] into the text fields. Simply add: Code:
$text = preg_replace('/\[ATTACH\=CONFIG\]\d\d\[\/ATTACH\]/', '', $text); Code:
if($text == '') $text = substr($fulltext, 0,150); |
Thanks for the excellent mod.
|
I have vbseo installed and the links dont seem to work with.
My CMS entry for article is en/[section_title]/[entry_title]-[entry_id].html Can you please help with the url of the article Thanks |
Quote:
replace PHP Code:
PHP Code:
|
hi,
The widget is not working. Already change the section id but the articles seem don't want to appear in the widget. what am i might be wrong? |
Quote:
|
1 Attachment(s)
Quote:
// Set Your Section ID Here $section = '147'; // Set The Number of Articles To Display $limit = '2'; // Set The Height of The Thumbnail Image $height = '250'; // Set The Width of The Thumbnail Image $width = '250'; $articlegrab = vB::$db->query_read(" SELECT ".TABLE_PREFIX."cms_nodeinfo.nodeid , ".TABLE_PREFIX."cms_nodeinfo.title , ".TABLE_PREFIX."cms_article.previewimage , ".TABLE_PREFIX."cms_article.previewtext , ".TABLE_PREFIX."cms_article.pagetext , ".TABLE_PREFIX."cms_article.contentid , ".TABLE_PREFIX."cms_node.nodeid , ".TABLE_PREFIX."cms_node.parentnode , ".TABLE_PREFIX."cms_node.contentid , ".TABLE_PREFIX."cms_node.url , ".TABLE_PREFIX."cms_node.publishdate , ".TABLE_PREFIX."cms_node.setpublish FROM ".TABLE_PREFIX."cms_article , ".TABLE_PREFIX."cms_nodeinfo , ".TABLE_PREFIX."cms_node WHERE (".TABLE_PREFIX."cms_nodeinfo.nodeid = ".TABLE_PREFIX."cms_node.nodeid) AND (".TABLE_PREFIX."cms_article.contentid = ".TABLE_PREFIX."cms_node.contentid) AND (".TABLE_PREFIX."cms_node.parentnode IN ($section)) AND (".TABLE_PREFIX."cms_node.setpublish != 0) ORDER BY ".TABLE_PREFIX."cms_node.publishdate DESC LIMIT $limit "); while($articleinfo = vB::$db->fetch_array($articlegrab)) { $title = $articleinfo['title']; $image = $articleinfo['previewimage']; $text = $articleinfo['previewtext']; $nodeid = $articleinfo['nodeid']; $url = $articleinfo['url']; $unixdate = $articleinfo['publishdate']; $date = date("F j, Y, g:i a", $unixdate); $fulltext = strip_bbcode($fulltext); $text = preg_replace('/\[ATTACH\=CONFIG\]\d\d\[\/ATTACH\]/', '', $text); $text = strip_bbcode($text); if($text == '') $text = substr($fulltext, 0,150); $output .= '<left>'; if($image != '') $output .= "<img src='".$image."' width='".$width."px' height='".$height."px' /><br />"; $output .= "<a href='content.php?".$nodeid."-".$url."'>".$title."</a><br /><p>Publish Date: ".$date."</p></br></center><p>".$text." <a href='content.php?".$nodeid."-".$url."'> <img alt='Read More' src='images/cms/read_more-right.png' title='Read More' border='0'></a></p><br />"; } |
Quote:
Thanks for your concern. I discover what's wrong with my widget. I tick the Permission Preview in the Display Content setting. After i remove the tick it's working now. :up: |
Note that you can "easily" modify it to have the "best rated articles of this month"
1?) Add this in the SELECTed fields : Code:
, ".TABLE_PREFIX."cms_nodeinfo.ratingtotal Code:
AND (MONTH(FROM_UNIXTIME(".TABLE_PREFIX."cms_node.publishdate))=MONTH(NOW()) AND YEAR(FROM_UNIXTIME(".TABLE_PREFIX."cms_node.publishdate))=YEAR(NOW())) Code:
ORDER BY ".TABLE_PREFIX."cms_node.publishdate DESC LIMIT $limit Code:
ORDER BY ".TABLE_PREFIX."cms_nodeinfo.ratingtotal DESC LIMIT $limit Code:
$rating = $articleinfo['ratingtotal']; Code:
<span class=\"cmsrating rating{$rating}\"></span> |
Thank you very much XManuX =) Will try it later.
Anyway to output the results in real time? Or at least weekly? What about modify it to the most viewed articles? =) |
Is there any way to make this not display the content of the article, just the title with a link?
|
Quote:
To display most viewed instead of most rated, replace this : Code:
, ".TABLE_PREFIX."cms_nodeinfo.ratingtotal Code:
, ".TABLE_PREFIX."cms_nodeinfo.viewcount Code:
ORDER BY ".TABLE_PREFIX."cms_nodeinfo.ratingtotal DESC LIMIT $limit Code:
ORDER BY ".TABLE_PREFIX."cms_nodeinfo.viewcount DESC LIMIT $limit Code:
$rating = $articleinfo['ratingtotal']; Code:
$views = $articleinfo['viewcount']; Code:
<span class=\"cmsrating rating{$rating}\"></span> Code:
Viewed $views times. |
Worked perfectly, both modifications, thanks XManuX =)
|
I'm trying to modify the:
// Set Your Section ID Here $section = '11'; so it recognizes the section where it is. Right now I have lots of latest, most popular and most viewed articles widgets for the various sections of my cms. Just one generic of each kind that could recognize the section where it is would make things a lot easier =) Any help ? =) |
Quote:
|
This is the code that prints the title and the link to the article:
PHP Code:
PHP Code:
|
This looks nice.
Could the photo be a link to the Article also? I think most users would starte by clicking it to see more. |
Good stuff here guys. Thanks for supporting Manu and King, been a bit busy myself.
|
I have this working on my homepage, and it's great!
However, is it possible for this to work in a forum sidebar block? |
I removed "Publish Date" line and all text has a center alignment. How can that be fixed?
|
i have a problem ...
i have no space between the pictures there is one directly next to the other and also with the text - there is no space between .... thx for help |
Maybe this will help somebody else (or me in case I made a mistake) but I like to set CMS articles to published at a future date/time and this widget code was still showing those even though they were not published yet. It checks for published but not WHEN it is published. Here is what I used to fix this:
Find: Code:
// Set The Width of The Thumbnail Image Code:
// Set the current day and time Code:
AND (".TABLE_PREFIX."cms_node.setpublish != 0) Code:
AND (".TABLE_PREFIX."cms_node.publishdate < ($datenow)) |
Any way to make the image auto resize like the "cms article preview", instead of having to input the image size?
|
is there a possiblity to link the pictures also to the articles with a hyperlink ?
thanks |
Would like to be able to float the image to the left and have the text flow around the image like the way the primary content widget works.
Any suggestions?? |
hello all,
i need some help... i inserted the code but the widget is empty. i tried to create a new widget by default "Recent articles" and this is not displayed too. is there any parameter that i have to edit in order to display the widget content? i created another one (media library) succesfully but this is still empty. thank you |
Hello,
This widget is exactly what I need, can someone PLEASE help me with exact code needed just to show article title, link and preview image and NOTHING else. Also I have sections with just video, if I use it in those sections with above requirements will it work??? All help greatly appreciated I am very technically challenged and need serious HELP PLEASE |
hello,
I have manageed to remove some of the stuff I didnot want (publish date etc) how do I remove the "read more" image and text from what is left below. I seem to get errors with everything I try $output .= "<a href='content.php?".$nodeid."-".$url."'>".$title."</a><br /></br></center><p>".$text." <a href='content.php?".$nodeid."-".$url."'> <img alt='Read More' src='images/cms/read_more-right.png' title='Read More' border='0'></a></p><br />"; } |
[QUOTE=OcR Envy;1978198]Find:
PHP Code:
PHP Code:
I also only want picture and title to show, everything else removed including read more HELP PLEASE ANYONE |
Will seriously pay someone to help me get this working how I want
ANYONE PLEASE!! |
How do/did you remove publish date?
|
This is the code I used which removes everything but the title and the picture
// Set Your Section ID Here $section = '1'; // Set The Number of Articles To Display $limit = '5'; // Set The Height of The Thumbnail Image $height = '100'; // Set The Width of The Thumbnail Image $width = '150'; $articlegrab = vB::$db->query_read(" SELECT ".TABLE_PREFIX."cms_nodeinfo.nodeid , ".TABLE_PREFIX."cms_nodeinfo.title , ".TABLE_PREFIX."cms_article.previewimage , ".TABLE_PREFIX."cms_article.contentid , ".TABLE_PREFIX."cms_node.nodeid , ".TABLE_PREFIX."cms_node.parentnode , ".TABLE_PREFIX."cms_node.contentid , ".TABLE_PREFIX."cms_node.url , ".TABLE_PREFIX."cms_node.setpublish FROM ".TABLE_PREFIX."cms_article , ".TABLE_PREFIX."cms_nodeinfo , ".TABLE_PREFIX."cms_node WHERE (".TABLE_PREFIX."cms_nodeinfo.nodeid = ".TABLE_PREFIX."cms_node.nodeid) AND (".TABLE_PREFIX."cms_article.contentid = ".TABLE_PREFIX."cms_node.contentid) AND (".TABLE_PREFIX."cms_node.parentnode IN ($section)) AND (".TABLE_PREFIX."cms_node.setpublish != 0) ORDER BY ".TABLE_PREFIX."cms_node.publishdate DESC LIMIT $limit "); while($articleinfo = vB::$db->fetch_array($articlegrab)) { $title = $articleinfo['title']; $image = $articleinfo['previewimage']; $nodeid = $articleinfo['nodeid']; $url = $articleinfo['url']; $fulltext = strip_bbcode($fulltext); $text = preg_replace('/\[ATTACH\=CONFIG\]\d\d\[\/ATTACH\]/', '', $text); $text = strip_bbcode($text); if($text == '') $text = substr($fulltext, 0,150); $output .= '<center>'; if($image != '') $output .= "<img src='".$image."' width='".$width."px' height='".$height."px' /><br />"; $output .= "<a href='content.php?".$nodeid."-".$url."'>".$title."</a><br /></br></center><p>".$text." </p><br />"; } |
Thanks Mark, worked great. Just what I've been looking for.
|
perfect glad I could actually help someone
|
Hello,
I have this mod install using above code that I changed a bit to remove everything but thumbnail and title, works fantastically, thanks to orignal coder. Can anyone tell me how to get the pictures on the left and title on the right using same modified code above PLEASE |
All times are GMT. The time now is 02:38 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|