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)
-   -   vBulletin CMS Widgets - Widget: Latest Articles In Section (https://vborg.vbsupport.ru/showthread.php?t=232443)

iamspookysdaddy 02-12-2010 08:27 PM

Quote:

At the very top of your widget add:
PHP Code:

if($show['guest']) { 

And at the bottom add:
PHP Code:




Okay this is very good. This blocks guest from seeing....Can you please advise for code to allow certain user groups to see. Sorry I do not know code but can apply your advice.

Thank you this is a most important modifcation!

Installed and Nominated!:up:

OcR Envy 02-15-2010 10:32 PM

Quote:

Originally Posted by Neptun (Post 1980291)
thanksss that you like my idea ;)

i have changed the code now with the "read more" instead of the "(more) and have put a little center & b to this - a change the text size of the discription - it looks really perfect now

perfect hack ;) now its perfect for me ;) and it looks really professional now ;)

thx for your help ;)

Glad you like it :)

Quote:

Originally Posted by iamspookysdaddy (Post 1981018)
Okay this is very good. This blocks guest from seeing....Can you please advise for code to allow certain user groups to see. Sorry I do not know code but can apply your advice.

Thank you this is a most important modifcation!

Installed and Nominated!:up:

Thanks for the nomination that's unexpected for such a small mod :)

For usergroups you'd do something like this:

PHP Code:

if(is_member_of($vbulletin->userinfo123)) { 

Replace the guest code with that. 1, 2, 3 being the usergroup numbers. This should also work for secondary usergroups :)

iamspookysdaddy 02-18-2010 01:04 AM

Quote:

Originally Posted by OcR Envy (Post 1983333)
Glad you like it :)



Thanks for the nomination that's unexpected for such a small mod :)

For usergroups you'd do something like this:

PHP Code:

if(is_member_of($vbulletin->userinfo123)) { 

Replace the guest code with that. 1, 2, 3 being the usergroup numbers. This should also work for secondary usergroups :)


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!!!

OcR Envy 02-18-2010 02:01 PM

Are you changing the 1, 2, 3 to match what usergroup id numbers you need?

iamspookysdaddy 02-19-2010 09:40 AM

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.

OcR Envy 02-26-2010 10:31 AM

Quote:

Originally Posted by iamspookysdaddy (Post 1986307)
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.


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);
    $text = strip_bbcode($text);

Before:

Code:

if($text == '') $text = substr($fulltext, 0,150);
And you should be good to go.

sniranjan 03-07-2010 01:29 PM

Thanks for the excellent mod.

sniranjan 03-07-2010 01:55 PM

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

sniranjan 03-07-2010 02:26 PM

Quote:

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
I just got this working with a small change:

replace

PHP Code:

$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 />"

with

PHP Code:

$output .= "<a href='content.php?r=".$nodeid."-".$url."'>".$title."</a><br /><p>Publish Date: ".$date."</p></br></center><p>".$text." <a href='content.php?r=".$nodeid."-".$url."'> <img alt='Read More' src='images/cms/read_more-right.png' title='Read More' border='0'></a></p><br />"

Thanks

neudimenxion 03-08-2010 04:20 AM

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?


All times are GMT. The time now is 06:27 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.01163 seconds
  • Memory Usage 1,759KB
  • 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
  • (2)bbcode_code_printable
  • (6)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)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