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)

level8 12-30-2010 03:01 PM

please help with one more bit of info :)

by default it list the NAME/DATE... I have a custom field (a website link) to fill in when people add an event. I can get a third line to display (below code) but what to I do to make the info in this field appear in the link?

code I have used is:
Quote:

<p class="cms_widget_post_content" style="font-size:9px; margin-bottom:5px"><a href="#">homepage</a></p>
</div>
What would I need to change the # to to make the info in my customfieldid=2 appear???

any help appreciated.

Mark4865 01-30-2011 12:24 PM

Is there a way to get the event to still show on the day it is taking place and only go away the day after

JimboSlice 01-30-2011 02:10 PM

Quote:

Originally Posted by mse2k (Post 2112824)
This is my code. It shows all upcomming events and the events on the actually day. But it shows not only 2 how in $show_count, it shows all. Can you help me. THX

I have looked at cant find the cause, if someone else can help that would be great.

JimboSlice 02-11-2011 05:00 PM

Can someone fix mse2k code so it doesnt show all events?

JimboSlice 02-16-2011 11:17 AM

does anyone have one of these that works correctly with vb 4.1.x?

ngcoders 02-16-2011 04:17 PM

Quote:

Originally Posted by JimboSlice (Post 2163169)
does anyone have one of these that works correctly with vb 4.1.x?

Yep it works fine.

JimboSlice 02-16-2011 05:18 PM

the dates are always a day off, or doesnt show todays events, only future.

alexm 02-23-2011 09:43 AM

Quote:

Originally Posted by JimboSlice (Post 2163287)
doesnt show todays events, only future.

Quote:

Originally Posted by Mark4865 (Post 2156414)
Is there a way to get the event to still show on the day it is taking place and only go away the day after

I think there is an error in the SQL query. It needs greater than or equal and less than or equal operators to include the current day, and the part for ranged events the operators were the wrong way round.

Try replacing the query with this:

Code:

$query = sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND (dateline_from >= '%1\$d' || (  dateline_from <= '%1\$d' AND dateline_to >= '%1\$d' ) || (dateline_to = 0 AND DATE(FROM_UNIXTIME(dateline_from)) = DATE(FROM_UNIXTIME(%1\$d)))) ORDER BY dateline_from ASC LIMIT %2\$d",TIMENOW,$show_count);
This should display all day events before and on the day they are happening, and ranged events before and WHILE they are happening.

Alex

ash50210 02-24-2011 06:57 AM

HI all,

after spend time reading all thread from pg 1 until 14 finally i was successfully made it happen. Thanks to all that contribute the idea here. so i would like to share the coding as per below:

----------------------------------------------------------------------------------------------------------------------

ob_start();

// %d
$show_count = 100;

$query = sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND (dateline_from >= '%1\$d' || ( dateline_from <= '%1\$d' AND dateline_to >= '%1\$d' ) || (dateline_to = 0 AND DATE(FROM_UNIXTIME(dateline_from)) = DATE(FROM_UNIXTIME(%1\$d)))) ORDER BY dateline_from ASC LIMIT %2\$d",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",date('jS M Y',$event['dateline_from']));
} else {
$format = sprintf("From %s to %s",date('jS M Y',$event['dateline_from']),date('jS M Y',$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();
return $output;
---------------------------------------------------------------------------------------------------------------------
This code suppose can show u all range of events.
cheers!

JimboSlice 02-24-2011 11:51 AM

the dates are all wrong when its displayed on my page. In fact, tomorrows events show as happening today and the date listed is todays date, instead of tomorrows.


All times are GMT. The time now is 11:57 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.01446 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
  • (1)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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