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)

tomsch 06-26-2011 11:34 PM

ok the range events not displaying is fixed in this version


Code:

ob_start();
global $db,$vbulletin;


$mydate =  mktime(0, 0, 0, date("m"), date("d")-1, date("Y"));
$show_count =10;

$query = sprintf("        SELECT * FROM ".TABLE_PREFIX."event
                                        WHERE visible = 1
                                        AND (dateline_from >= '$mydate' || (dateline_from >= '$mydate' AND dateline_to <= '$mydate' ) || ('$mydate' BETWEEN dateline_from AND dateline_to))
                                        ORDER BY dateline_from ASC LIMIT $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',$event['dateline_from'],false,true,false,true),vbdate('jS M Y',$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;

ob_end_clean();


Eq4bits 06-27-2011 07:12 AM

Awesome, tomsch! Thanks bunches!.
I added the horizontal line to mine like this:
Code:

<p class="cms_widget_post_content">%s<br><img src="images/hz-line.png"></p>

toxin 06-29-2011 04:01 PM

Range events are working, but when there's a recurring event the widget only displays the range.

I have created a recurring event. The range is starting Jan 01, ending Dec 31 and the event is 1st Sunday of every month.

The event is listed, but the widget just displays this:
My Event
From Sat Jan 1st 2011 to 31st Dec 2011
And because the range started Jan 1st, this event is always at the top of the list.

rcull 07-02-2011 02:38 AM

I just tried this code and got the following error:

Parse error: syntax error, unexpected T_STRING in /home/teambuic/public_html/forums/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 32

Thanks

tomsch 07-02-2011 12:01 PM

[QUOTE=rcull;2215721]I just tried this code and got the following error:

Parse error: syntax error, unexpected T_STRING in /home/teambuic/public_html/forums/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 32

Thanks[/Q

sounds like you either have a cut and paste error or the widget configured wrong

rcull 07-02-2011 12:59 PM

Thanks,
It was a cut and paste error!

kylek 07-31-2011 08:53 PM

Quote:

Originally Posted by Eq4bits (Post 2213416)
Awesome, tomsch! Thanks bunches!.
I added the horizontal line to mine like this:
Code:

<p class="cms_widget_post_content">%s<br><img src="images/hz-line.png"></p>


Where would you add this to the code? Looking for either a line between events or just a space.

Thanks tomsch for all your input you have added!

level8 08-17-2011 06:21 PM

wow great updates thanks for making this even better... is it possible to add a generic icon next to each post?
if so where would you insert the code?

level8 08-17-2011 06:29 PM

Quote:

Originally Posted by level8 (Post 2033847)
great widget...
can anyone help with 2 things?
1. How do I add a link at the bottom of the widget called somethign like "Add an Event" which simply will link to the http://****.com/calender.php?
2. Add a small icon image next to all events (https://vborg.vbsupport.ru/external/2011/08/21.gif ).

Any help is much appreciated :)

this is what i need help on :)

XrayHead 10-01-2011 08:30 AM

Hi All

Anyone know how to lose the stupid PHP icon in the upper top left?

https://vborg.vbsupport.ru/external/2011/10/77.png


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