Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 05-02-2004, 05:34 PM
Curll's Avatar
Curll Curll is offline
 
Join Date: Apr 2003
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

echo $news; you mean?

Now, anyway I could make those link to the expanded info on the Calander pages?
Reply With Quote
  #12  
Old 05-02-2004, 07:23 PM
Pseudomizer's Avatar
Pseudomizer Pseudomizer is offline
 
Join Date: Mar 2002
Location: Germany
Posts: 614
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Curll
echo $news; you mean?

Now, anyway I could make those link to the expanded info on the Calander pages?
Sure. Link to the calendarid and that's it.

Cheers,
Reply With Quote
  #13  
Old 05-02-2004, 07:44 PM
Curll's Avatar
Curll Curll is offline
 
Join Date: Apr 2003
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That was a wee bit vague...or very vague.

PHP Code:
echo "<a href=\"calendar.php?$calendarid\">$news</a>"
Obviously isn't going to work.

So, exactly how should I link to the Calendarid?
Reply With Quote
  #14  
Old 05-02-2004, 07:56 PM
Pseudomizer's Avatar
Pseudomizer Pseudomizer is offline
 
Join Date: Mar 2002
Location: Germany
Posts: 614
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this one:

PHP Code:
$events $DB_site->query("select * from event order by dateline DESC limit 5"); 

if (
$DB_site->num_rows($events)) 

        while (
$ev $DB_site->fetch_array($events)) 
        { 
             
$news="";
             
$new_date vbdate('Y.m.d'$ev['dateline'], falsefalse); 
             
$news .= "<B>".$new_date."</B><BR>"
             
$news .= $ev['title']."<BR>"

echo 
"<A HREF=\"calendar.php?do=getinfo&e=$ev[eventid]&day=$new_date&c=1\">$news</A>";
              
        } 

Cheers,
Reply With Quote
  #15  
Old 05-02-2004, 08:15 PM
Richardg Richardg is offline
 
Join Date: Jul 2003
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey Pseudomizer..maybe you can help me!

I'm trying to add events from an external calendar.

I've inserted rows with the start date in the dateline_from column & the end date in dateline_to column. I've converted my dates & times using the UNIX_TIMSTAMP
I'm not sure what goes in the dateline or UTC columns
I'm running into trouble with timezone offsets (!)...which may be something to do with the dateline & UTC columns...
I am in BST timezone (British Summer Time).
The event I inserted from my external calendar shows up in he vBulletin calendar but it says it was posted for GMT.
What I want to do is to insert events which always show up correctly for my local time (GTM/BST) even if a) the event spans the point at which local time changes from BST to GMT and b) I insert now (BST) an event which will take place when daylight saving ends and we change to GMT.
cheers
Reply With Quote
  #16  
Old 05-02-2004, 08:25 PM
Pseudomizer's Avatar
Pseudomizer Pseudomizer is offline
 
Join Date: Mar 2002
Location: Germany
Posts: 614
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Richardg
Hey Pseudomizer..maybe you can help me!

I'm trying to add events from an external calendar.

I've inserted rows with the start date in the dateline_from column & the end date in dateline_to column. I've converted my dates & times using the UNIX_TIMSTAMP
I'm not sure what goes in the dateline or UTC columns
I'm running into trouble with timezone offsets (!)...which may be something to do with the dateline & UTC columns...
I am in BST timezone (British Summer Time).
The event I inserted from my external calendar shows up in he vBulletin calendar but it says it was posted for GMT.
What I want to do is to insert events which always show up correctly for my local time (GTM/BST) even if a) the event spans the point at which local time changes from BST to GMT and b) I insert now (BST) an event which will take place when daylight saving ends and we change to GMT.
cheers
Hi Richard,

i have never done such a thing before but i can give you some guidance in which direction you should look to find the error. When you post something or you create a thread in all php files they are using the same function. Please have a closer look into this section:

PHP Code:
    $serveroffset date('Z'TIMENOW) / 3600

    
$fromdate getdate(TIMENOW + (-12 $serveroffset) * 3600); 
    
$new_date date('d-m-Y'TIMENOW + (-12 $serveroffset) * 3600 ); 
In addition i would suggest that you look into the calendar_functions.php in your /includes directory.

Hope this helps.

Cheers,
Reply With Quote
  #17  
Old 05-02-2004, 09:36 PM
Curll's Avatar
Curll Curll is offline
 
Join Date: Apr 2003
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, I fooled around with it to get it to work, or at least link correctly (for my site and my settings.)

PHP Code:
echo "<hr><b><a href=\"http://www.xblgamers.com/forums/calendar.php?\">Latest Events</a> . . .</b><b><p>";




$events $DB_site->query("select * from event order by dateline DESC limit 5"); 


if (
$DB_site->num_rows($events)) 

        while (
$ev $DB_site->fetch_array($events)) 
        { 
            
            
$new_date vbdate('m.d.Y'$ev['dateline'], falsefalse); 
            
$link_date vbdate('Y-m-d'$ev['dateline'], falsefalse); 
             
$news .= "<b>".$new_date."</b>"."<BR>"
             
$news .= "</b>".$ev['title']."<BR>"
              
        } 


echo 
"<A HREF=\"/forums/calendar.php?do=getinfo$ev[eventid]&day=$link_date&c=1\">$news</A>"
?> 
But, the array, all 5 items, link to one day, the day of the last item. Sooo, how could we put in a check thingy to get a link to each event?
Reply With Quote
  #18  
Old 05-02-2004, 09:43 PM
Pseudomizer's Avatar
Pseudomizer Pseudomizer is offline
 
Join Date: Mar 2002
Location: Germany
Posts: 614
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Curll
Hmm, I fooled around with it to get it to work, or at least link correctly (for my site and my settings.)

PHP Code:
echo "<hr><b><a href=\"http://www.xblgamers.com/forums/calendar.php?\">Latest Events</a> . . .</b><b><p>";




$events $DB_site->query("select * from event order by dateline DESC limit 5"); 


if (
$DB_site->num_rows($events)) 

        while (
$ev $DB_site->fetch_array($events)) 
        { 
            
            
$new_date vbdate('m.d.Y'$ev['dateline'], falsefalse); 
            
$link_date vbdate('Y-m-d'$ev['dateline'], falsefalse); 
             
$news .= "<b>".$new_date."</b>"."<BR>"
             
$news .= "</b>".$ev['title']."<BR>"
              
        } 


echo 
"<A HREF=\"/forums/calendar.php?do=getinfo$ev[eventid]&day=$link_date&c=1\">$news</A>"
?> 
But, the array, all 5 items, link to one day, the day of the last item. Sooo, how could we put in a check thingy to get a link to each event?
This is very easy to answer. If you look at my original post you will see that i did put the echo with the link IN THE if and while loop. You placed it outside. Just have a look at my original code.

Cheers,
Reply With Quote
  #19  
Old 05-02-2004, 09:45 PM
Curll's Avatar
Curll Curll is offline
 
Join Date: Apr 2003
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah...but....looking is hard :'(
Reply With Quote
  #20  
Old 05-02-2004, 09:48 PM
Pseudomizer's Avatar
Pseudomizer Pseudomizer is offline
 
Join Date: Mar 2002
Location: Germany
Posts: 614
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Curll
Yeah...but....looking is hard :'(
Sorry, i did not get this. Does it work now ? Or is something else wrong now ?

Cheers,
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:32 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04444 seconds
  • Memory Usage 2,309KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete