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 Forum Sideblocks - UpComing Events SideBlock/Bar With/Without Image (https://vborg.vbsupport.ru/showthread.php?t=253239)

wickedstangs 01-02-2011 12:09 PM

Quote:

Originally Posted by rammieone (Post 2142682)
Did you load it with the images???
As otherwise it seems to show a day behind

Loaded it with the images and had to use this code.. and it works now...
Code:

$format = sprintf("On %s%s %s %s",date("j",$event['dateline_from'])+1, date("S",$event['dateline_from']), date("M",$event['dateline_from']), date("Y",$event['dateline_from']));

ProFifaLeagues 01-02-2011 01:15 PM

Cheers for the code it may well help out another user

Raul7 02-07-2011 03:33 AM

Quote:

Originally Posted by wickedstangs (Post 2142707)
Loaded it with the images and had to use this code.. and it works now...
Code:

$format = sprintf("On %s%s %s %s",date("j",$event['dateline_from'])+1, date("S",$event['dateline_from']), date("M",$event['dateline_from']), date("Y",$event['dateline_from']));

thanks man, it helped me.

Raul7 02-07-2011 03:20 PM

guys is there anyway to show this on "NON" VB pages?

ProFifaLeagues 02-08-2011 03:24 AM

Quote:

Originally Posted by Raul7 (Post 2159792)
guys is there anyway to show this on "NON" VB pages?


Something i have'nt looked at mate but your welcome to have a go and do some testing to get it working on a non vbull page.

Raul7 02-08-2011 06:26 AM

Quote:

Originally Posted by rammieone (Post 2160055)
Something i have'nt looked at mate but your welcome to have a go and do some testing to get it working on a non vbull page.

here is a the query for anyone intrested, as you see its very basic , you need to add the styling code on top of it, the reason i am not adding mine is everyone page is differing ! btw i am using Event forum, if u r not, take out any reference to lv_vb_eventforums_threadid !

PHP Code:

<?php
require("db.php"); /*this is your DB connection file */
$ctime time();
$query "SELECT title , lv_vb_eventforums_threadid, dateline_from FROM  event where dateline_from > '$ctime' ORDER BY dateline_from ASC LIMIT 2;";
$result mysql_query($query) or die('Query failed: ' mysql_error());

echo 
"<table width='290'>";

while (
$row mysql_fetch_assoc($result)) {
echo 
"<tr><td>";

echo 
"<a href='http://YOURFORUMLINK/showthread.php?".$row['lv_vb_eventforums_threadid']."' target=_blank>".$row['title']."</a>";

echo 
"<br /><b>On ";
$unixtime $row['dateline_from'];


$realtime date("F d"$unixtime 86400);
echo 
$realtime."</b>";

echo 
"<hr></td></tr>";

}

echo 
"</table>";
mysql_free_result($result);
?>

i aint any advance PHP coder, so excuse my code if its very basic :D

Mark4865 02-08-2011 09:49 AM

Hello All,

Great mod and good work by all who contributed.

I have a few questions (you are talking to a technical idiot please bear that in mind when answering)

Will this work as a widget in CMS
Is there a way to have images to the left and event data on the right (any chance someone can show me full code to do this PLEASE)
If someone has worked out how to get it to work for single calendars please advise I run two calendars and would like to have a widget for each of them.

Many thanks in advance to anyone who takes the time to answer me

bitbender 02-08-2011 06:50 PM

I have a similar need, Mark4 - good of ya to ask - I was just searching for that function.

and btw - it works just fine in CMS - Just remember to return a variable of $results as instructed. The scripts above in the root post refer to $output..

1_ Admin CP - CMS - Widget Manager - Create Widget - Direct PHP execution type - Give it a title.
2) Select configure from the list after the addd of the widget and the code above of your choice. I will assume you know how to copy the code block and paste it.

3) In your pasted block, scroll all the way to the end - If the one you copied ends like this
Code:

return $output;


Then change it to this:
Code:

return $result;
Save it, and then add the block to a page layout you are using. Worked just like that for me in 4.1.1

now, to customize it by event :)

Cheers

Raul7 02-09-2011 05:33 AM

2 questions :

1- ) can someone explain what is // %d ? I am just trying to learn

2-) another issue i have right now is when an even is on Feb 9th, as soon as clock turn to FEB 9th, the even is gone, is it possible to keep it until end of the current date?

Thanks,

Mark4865 02-09-2011 10:44 AM

Hello BitBender

thanks for info, cutting and pasting just about covers my technical knowlege so I can manage that thanks.

I want a widget with images but the image on the left and text on the right, but the text should be limited to the title only that will take you to the event if click on it. Any chance you can help me with the code required to acheive that result?

Sorry I know I am asking a lot here


All times are GMT. The time now is 08:01 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.01305 seconds
  • Memory Usage 1,754KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)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