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 - Upcoming Events (https://vborg.vbsupport.ru/showthread.php?t=231365)

imported_EkSeS 05-08-2013 05:57 AM

Quote:

Originally Posted by fxdigi-cash (Post 2420637)
is it possible to display the upcoming events on top of forumhome instead of sideblock??

Another mod do that: Upcoming Events on Top of Pages

----

I have installed & edited some Fields of this Mod :
PHP Code:

ob_start(); 


//  %d 
$show_count 5

$query sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND (dateline_from > '%d' || (  dateline_from < '%d' AND dateline_to > '%d' )) ORDER BY dateline_from ASC LIMIT %d",TIMENOW,TIMENOW,TIMENOW,$show_count);   

$event_get vB::$db->query_read($query); 

$output_bits ''
while(
$event vB::$db->fetch_array($event_get)) { 

     if(
$event['dateline_to'] == 
     { 
         
$format sprintf("Am %s",date('d.m.y',$event['dateline_from'])); 
     } else { 
         
$format sprintf("Am %s",date('d.m.y ',$event['dateline_from']),date('d.m.y H:i',$event['dateline_to'])); 
     } 
      
     
$output_bits .= sprintf(
        <div class = "cms_widget_post_bit"><h4 class="cms_widget_post_header"><a href="calendar.php?do=getinfo&e=%d">%s</a></h4> 
            <p class="cms_widget_post_content">%s</p> 
        </div> 
        '
,$event['eventid'],$event['title'],$format); 


$output $output_bits


ob_end_clean(); 

Well ..

I have multiple calendars.
1. Visible for guests
2. Visible for users
3. Visible for moderators

On the CMS, guests can see the all the Event Titles :eek:

Permissions of 2. & 3. Calendars are hidden for guests

How can i hide the Titles for guests ?

fxdigi-cash 05-08-2013 07:45 AM

Quote:

Originally Posted by imported_EkSeS (Post 2420642)
Another mod do that: Upcoming Events on Top of Pages

----

I tried that one, but there is a date bug... and needs to be fixed...

fxdigi-cash 05-09-2013 02:11 AM

still there is an issue with expired events... they still there after all while they are supposed to be removed when events finished........

Update: the expired event get removed one day after the event date... not big issue. Thanks

behcet 07-25-2013 06:46 PM

Quote:

Originally Posted by tomsch (Post 2196969)
Code:

ob_start();
global $db,$vbulletin;

$mydate3 =  mktime(0, 0, 0, date("m"), date("d"), date("Y"));

//  %d
$show_count =10;

$query = sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND (dateline_from >= '$mydate3' || (  dateline_from >= '$mydate3' AND dateline_to <= '%d' )) ORDER BY dateline_from ASC LIMIT %d",TIMENOW,TIMENOW,TIMENOW,$show_count);

$event_get = vB::$db->query_read($query);

$output_bits = '';
while($event = vB::$db->fetch_array($event_get)) {

    if($event['dateline_to'] == 0 )
    {
        $format = sprintf("On %s",vbdate('D M jS Y',$event['dateline_from'],false,true,false,true));
    } else {
        $format = sprintf("From %s to %s",vbdate('D M jS Y h:i:s A',$event['dateline_from'],false,true,false,true),vbdate('jS M Y h:i:s A',$event['dateline_to'],false,true,false,true));
    }
     
    $output_bits .= sprintf('
        <div class = "cms_widget_post_bit"><h4 class="cms_widget_post_header"><a href="calendar.php?do=getinfo&e=%d">%s</a></h4>
            <p class="cms_widget_post_content">%s</p>
        </div>
        ',$event['eventid'],$event['title'],$format);

}
$output = $output_bits;


this will display the times for the Range events. But there is a small catch when you enter the range event leave the time zone setting to GMT.

i left off the time for the all day event as its always the same time because of the way its stored.

i also fixed a bug in my code the mydate3 variable was commented out for my fixed date.

tnx, my problem solved

rotor 12-12-2013 12:59 AM

Quote:

Originally Posted by imported_EkSeS (Post 2420642)
Another mod do that: Upcoming Events on Top of Pages

----

I have installed & edited some Fields of this Mod :
PHP Code:

ob_start(); 


//  %d 
$show_count 5

$query sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1  AND (dateline_from > '%d' || (  dateline_from < '%d' AND  dateline_to > '%d' )) ORDER BY dateline_from ASC LIMIT  %d",TIMENOW,TIMENOW,TIMENOW,$show_count);   

$event_get vB::$db->query_read($query); 

$output_bits ''
while(
$event vB::$db->fetch_array($event_get)) { 

     if(
$event['dateline_to'] == 
     { 
         
$format sprintf("Am %s",date('d.m.y',$event['dateline_from'])); 
     } else { 
         
$format sprintf("Am %s",date('d.m.y ',$event['dateline_from']),date('d.m.y H:i',$event['dateline_to'])); 
     } 
      
     
$output_bits .= sprintf(
        <div class = "cms_widget_post_bit"><h4  class="cms_widget_post_header"><a  href="calendar.php?do=getinfo&e=%d">%s</a></h4> 
            <p class="cms_widget_post_content">%s</p> 
        </div> 
        '
,$event['eventid'],$event['title'],$format); 


$output $output_bits


ob_end_clean(); 

Well ..

I have multiple calendars.
1. Visible for guests
2. Visible for users
3. Visible for moderators

On the CMS, guests can see the all the Event Titles :eek:

Permissions of 2. & 3. Calendars are hidden for guests

How can i hide the Titles for guests ?

After using this on a 4.2.2 site I now have an error:

Parse error: syntax error, unexpected ';' in /home/XXXXXXXX/public_html/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 4


even after I deleted the widget I still get the errors!!!!

so what has it changed elsewhere??

any ideas????

twistedsoul 05-30-2016 02:53 AM

great widget, but is there a way to display the event in a color other than white?

oldfan 04-15-2023 03:43 PM

works 4.2.4, php 7.2
any there a way to make it to show multiple years like a event on april 15 2023 and april 15 1999?


All times are GMT. The time now is 10:08 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.01561 seconds
  • Memory Usage 1,766KB
  • 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
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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