View Full Version : Help with Upcoming events widget
Mark4865
05-14-2011, 05:22 PM
Hello,
Not sure if this is the right place to ask for help, sorry in advance if it is not.
I am having issues with the following upcoming events widget, (https://vborg.vbsupport.ru/showthread.php?p=2195638#post2195638) I have asked people on the thread and no-one seems to have suggestons on how to get it to work with images in the CMS.
Someone suggested I ask here for help?? I have posted the code I used on the thread, it works fine but the images only show in the actual event and not the widget.
Would be really grateful for assistance
thanks
Mark4865
05-18-2011, 08:48 PM
Anyone PLEASE my site goes live next week and I would really like images to show as it looks terrible with blank blocks
Lynne
05-18-2011, 09:10 PM
Can we get a link to see what the problem is. If you are getting blank blocks, then the url is incorrect and the only way to see that is in the page source. Also, I looked in that thread and nowhere in there do I even see anything about images. So, where are these images coming from?
Mark4865
05-20-2011, 11:30 AM
Hello Lynne,
thanks for responding. If you are prepared to have a look I can send you the code and give you log in access to the site to see what the problem is.
would be extremely grateful if you have the time. I gathered the problem was in the image url and have tried various things but nothing works.
thanks as always
Lynne
05-20-2011, 02:58 PM
That is a sidebar modification. So, are you trying to modify it and make it a widget? Is there a reason you can't just post your code here (helping via PM doesn't help others) - use the code tags please.
Mark4865
05-20-2011, 03:10 PM
Hello Lynne,
thanks for response, more than happy to post code (see below) It seems to work as a widget except for images (I was told on mod thread that it would work as a CMS widget.
See details below including example url that I have tried, grateful for any assistance.
I have used this in the CMS with a few changes (images on right text on left) works great BUT cant get images to show. They show up fine in the actual event but not in the widget here is an example of my image address for one image http://www.mywebsite.co.za/temp%20lo...Beach_2010.jpg
this is the code I have used, how do I get the image to show
ob_start();
// %d
$show_count = 10;
$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'] == 0 )
{
$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']));
} 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"><a href="calendar.php?do=getinfo&e=%d"><img src="http://www.YourForum.com/forum/images/event.jpg" width="75" height="60" alt="Upcoming Event" HSPACE="7" VSPACE="3" align="left"/><h4 class="cms_widget_post_header"><b>%s</b></a></h4>
<p class="cms_widget_post_content"><b>%s</b></p>
</div> <BR/><BR/>
',$event['eventid'],$event['title'],$format);
Lynne
05-20-2011, 03:13 PM
This is what your code says for where it is looking for the image:
<img src="http://www.YourForum.com/forum/images/event.jpg" width="75" height="60" alt="Upcoming Event" HSPACE="7" VSPACE="3" align="left"/>
Can you tell use exactly where that image is if it isn't there?
Mark4865
05-20-2011, 04:25 PM
Hello Lynne,
That is the code originally put in by the 1st coder and they advise people using the widget to put in their own url. I have multiple images (one per event) all stored in a folder in my forum root.
One such image address for example is http://www.mywebsitename.co.za/temp%20lo...Beach_2010.jpg is shows up in the calendar if you go to the event but not in the widget.
Any ideas
Lynne
05-20-2011, 04:41 PM
So what is your code that you put in the widget to show the image? You had to have changed the code in order to show your own image, so what code are you using?
Mark4865
05-20-2011, 05:03 PM
hello,
I tried the one shown above being http://www.mywebsitename.co.za/temp%...Beach_2010.jpg as well as www.myforum.co.za/cms/temp%...Beach_2010.jpg and none of it worked open to any suggestions
Lynne
05-20-2011, 07:54 PM
Without you posting your *exact* code and seeing a link that uses that code, it's impossible to say why it's not working.
Mark4865
05-20-2011, 08:20 PM
Hello Lynne,
thanks for response, below is link to one of the logo's uploaded to my root that I am trying to access. there are different logo's uploaded for each event and all the logo's show up perfectly in the calendar event using the insert image from url function in calendar events.
How do I get them to show up in the widget please.
http://www.porscheplanet.co.za/temp%20logos/2-LongBeach_2010.jpg
Lynne
05-20-2011, 08:37 PM
I would strongly suggest not putting them into a directory that has a space in it. That will cause you issues when trying to use it. That may be your problem.
But, I don't think you are understanding what I'm asking for, I want to see your code that puts that image you just linked to into the widget. Then I want to see your widget and look at the page source to see why it isn't showing your image.
Mark4865
05-21-2011, 05:29 AM
Hello Lynne,
thanks for all the effort in responding to this, your time is much appreciated.
Unfortunately I am a total technical idiot so just have no idea what you are asking for, is there anyway you would consider going to the website to have a look if I gave you log in. Once resolved we could post results here so others could benifit from solution.
Lynne
05-21-2011, 04:11 PM
All I'm asking for it what your code looks like. You can't be using the exact code posted in post 6, because the image in there points to http://www.YourForum.com/forum/images/event.jpg . You must have changed that if you are trying to point to http://www.porscheplanet.co.za/temp%20logos/2-LongBeach_2010.jpg - didn't you?
You can send me a link/login to your site if you want, but I still need to see the *exact* code you are using.
And, I would strongly suggest not have a space in your directory name.
Mark4865
05-21-2011, 05:19 PM
Hello Lynne,
thanks for response, I understand what you mean about code I did try all different versions and nothing worked, I will pm you log in details, thanks for effoert.
regards
mark
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.