phpBB2.de Foren-Übersicht  
[netclusive - internet broadcasting]
 FAQ  •  Suchen  •  Download  •  Lesezeichen  •  Mitgliederliste  •  Benutzergruppen   •  Registrieren  •  Profil  •  Einloggen, um private Nachrichten zu lesen  •  Login
 
        
 
        
 

LinkLift

Nächstes Thema anzeigen
Vorheriges Thema anzeigen

Dieses Forum ist gesperrt, du kannst keine Beiträge editieren, schreiben oder beantworten.Dieses Thema ist gesperrt, du kannst keine Beiträge editieren oder beantworten.
Autor Nachricht
Thomson
Universal Genius



Anmeldungsdatum: 05.08.2002
Beiträge: 4726
Wohnort: a shibby place

BeitragVerfasst am: So 14 Sep, 2003 14:27 Antworten mit ZitatNach oben 

Mod Name: Events für ezPortal
Mod Author: oxpus
phpBB-Versions: 2.0.x
Mod-Description: Übernimmt Termine aus dem Calender Lite 1.4.xx und stellt sie im ezPortal dar
Mod-Requierments: Calendar
Discussion: http://www.phpbb2.de/viewtopic.php?t=4401

_________________
There are only 10 types of people in the world: Those who understand binary, and those who don't...
OfflineBenutzer-Profile anzeigenPrivate Nachricht sendenE-Mail sendenWebsite dieses Benutzers besuchenICQ-Nummer
Google







Verfasst am: Nach oben

ddt
phpBB2.de User
phpBB2.de User



Anmeldungsdatum: 18.10.2003
Beiträge: 3

BeitragVerfasst am: Sa 18 Okt, 2003 01:01 Antworten mit ZitatNach oben 

Sorry for writing this in English, I don't speak German very well.

I was looking for a mod exactly like this for weeks, but finally I found it... Thanks, Oxpus!

I installed it and everything works fine except one thing: the date format in the portal page box is always in a dd.mm.yyyy format and no matter what I do I cannot change it from ACP. This is strange because it's not even the default date format I use on the whole site. May you have a suggestion how I could fix it?

Cheers,
ddt
OfflineBenutzer-Profile anzeigenPrivate Nachricht senden
oxpus
phpBB2.de User
phpBB2.de User



Anmeldungsdatum: 11.02.2003
Beiträge: 8613
Wohnort: Bad Wildungen

BeitragVerfasst am: Sa 18 Okt, 2003 02:33 Antworten mit ZitatNach oben 

Yes you can:

In portal.php find
Code:
            $start_date = substr($row['stamp'],8,2).".".substr($row['stamp'],5,2).".".substr($row['stamp'],0,4);
            $end_date = substr($row['eventspan'],8,2).".".substr($row['eventspan'],5,2).".".substr($row['eventspan'],0,4);

and replace with
Code:
      $start_date = mydateformat($row['stamp'], $userdata['user_dateformat']);
      $end_date = mydateformat($row['eventspan'], $userdata['user_dateformat'], 1);

Make sure the function "mydateformat" will be contended on functions.php. This will be done while installing the calendar.

This will format the dates based on the user settings. To format them like the board settings, replace
$userdata['user_dateformat']
with
$board_config['default_dateformat']

Sorry for my bad english Wink
OXPUS

_________________
Karsten Ude
Support nur im Forum! || Support just on Forum!
OXPUS's Mods


Zuletzt bearbeitet von oxpus am Sa 18 Okt, 2003 02:38, insgesamt 4-mal bearbeitet
HiddenBenutzer-Profile anzeigenPrivate Nachricht sendenE-Mail senden
ddt
phpBB2.de User
phpBB2.de User



Anmeldungsdatum: 18.10.2003
Beiträge: 3

BeitragVerfasst am: Sa 18 Okt, 2003 12:54 Antworten mit ZitatNach oben 

Thanks for the quick reply!

I made the changes, but got parse error. If I'm right, the problem must be with "mydateformat", as you mentioned here:

Zitat:
"Make sure the function "mydateformat" will be contended on functions.php. This will be done while installing the calendar.


Would you please explain this sentence a bit more? I checked it, but there's no "mydateformat" defined in my fuctions.php. (My board is phpBB Plus 1.2, the calendar was preinstalled). But of course there is $board_config['default_dateformat'], and I think this is all I need, as I don't want this date to be configurable by users. Also, I don't need the "end_date", as the events on my board are almost exclusively football matches.

Sorry for making this so hard... Smile
OfflineBenutzer-Profile anzeigenPrivate Nachricht senden
oxpus
phpBB2.de User
phpBB2.de User



Anmeldungsdatum: 11.02.2003
Beiträge: 8613
Wohnort: Bad Wildungen

BeitragVerfasst am: Sa 18 Okt, 2003 15:21 Antworten mit ZitatNach oben 

Okay, error myselfs. The needed funktion is in the calendar.php itself, not in functions.php.
So check for
Code:
function mydateformat($thisdate, $dateformat='d M Y G:i', $span=0)
{
   global $cal_config;

   if ($cal_config['cal_dateformat']) {
      $dateformat = $cal_config['cal_dateformat'];
      }

   // date comes in as the following:
   $myr = substr($thisdate, 0, 4);
   $mym = substr($thisdate, 5, 2);
   $myd = substr($thisdate, 8, 2);
   $myh = substr($thisdate, 11, 2);
   $myn = substr($thisdate, 14, 2);
   $mys = substr($thisdate, 17, 2);

   if ($span || ($myh=='00' && $myn=='00' && $mys=='00')) {
      // Need to strip out any TIME references so...
      $timerefs = array ('a','A','B','g','G','h','H','i','I','s');
      while (list(,$val) = each ($timerefs))
         {
         $dateformat = ereg_replace($val, "", $dateformat);
         }
      // strip out any characters used for time
      $dateformat = ereg_replace('[:\.]', " ", $dateformat);
   }

   $returndate = date($dateformat, mktime ($myh,$myn,$mys,$mym,$myd,$myr));
   return $returndate;
}

or insert this code in the functions.php and delete it from the calendar.php. This will format the event dates correctly.

And please use my code like it is. The variables $start_date and $end_date defines correctly the dates of the events. Like their names will be an "singleday" event sets $start_date = $end_date, on "multiday" events the $start_date will content the first day of the event and the last event day is sets in $end_date.

And nothing is hard enough to find a solution Wink

OXPUS

_________________
Karsten Ude
Support nur im Forum! || Support just on Forum!
OXPUS's Mods


Zuletzt bearbeitet von oxpus am Sa 18 Okt, 2003 18:25, insgesamt einmal bearbeitet
HiddenBenutzer-Profile anzeigenPrivate Nachricht sendenE-Mail senden
ddt
phpBB2.de User
phpBB2.de User



Anmeldungsdatum: 18.10.2003
Beiträge: 3

BeitragVerfasst am: So 19 Okt, 2003 02:10 Antworten mit ZitatNach oben 

Yapp, now it works perfectly for the 2nd try, but only if I clear the above mentioned code from calendar.php, and paste it into functions.php. Thank you. Very Happy

One last thing:
The events' date in the portal box is now in the needed format, everything is fine, but the language (aka name of days and months) remains english though the default language for the site is hungarian. Everywhere else on the site the date language is working well. What do you think?
OfflineBenutzer-Profile anzeigenPrivate Nachricht senden
oxpus
phpBB2.de User
phpBB2.de User



Anmeldungsdatum: 11.02.2003
Beiträge: 8613
Wohnort: Bad Wildungen

BeitragVerfasst am: So 19 Okt, 2003 08:48 Antworten mit ZitatNach oben 

I think the dateformat on the calendar-config will be set... Please check this in the ACP and clear the refered field.
Also check the default format for the board date.
At least you can change on the function mydateformat
Code:
if ($cal_config['cal_dateformat']) {
      $dateformat = $cal_config['cal_dateformat'];
      }

into
Code:
$dateformat = $board_config['default_dateformat'];


OXPUS

_________________
Karsten Ude
Support nur im Forum! || Support just on Forum!
OXPUS's Mods


Zuletzt bearbeitet von oxpus am So 19 Okt, 2003 08:50, insgesamt einmal bearbeitet
HiddenBenutzer-Profile anzeigenPrivate Nachricht sendenE-Mail senden
BK
phpBB2.de User
phpBB2.de User



Anmeldungsdatum: 07.02.2004
Beiträge: 3

BeitragVerfasst am: So 08 Feb, 2004 04:52 Antworten mit ZitatNach oben 

I have a question with this mod, and I have posted the question in the following post:

http://www.phpbb2.de/viewtopic.php?t=10568

Thanks.
OfflineBenutzer-Profile anzeigenPrivate Nachricht senden
Nexxo
phpBB2.de User
phpBB2.de User



Anmeldungsdatum: 06.11.2003
Beiträge: 10
Wohnort: Hamburg

BeitragVerfasst am: Mo 09 Feb, 2004 16:41 Antworten mit ZitatNach oben 

Hallo Leute ,

mich würde zunächstmal eine DEMO interessieren. Damit kann ich erstmal beurteilen , ob das Teil was für mich wäre. Das nächste wäre zu sagen unter welchen Versionen der Hack läuft. Ich benutze phpBB2 plus1.3

Mit freundlichen Grüssen
Nexxo
OfflineBenutzer-Profile anzeigenPrivate Nachricht sendenE-Mail sendenWebsite dieses Benutzers besuchen
oxpus
phpBB2.de User
phpBB2.de User



Anmeldungsdatum: 11.02.2003
Beiträge: 8613
Wohnort: Bad Wildungen

BeitragVerfasst am: Mo 09 Feb, 2004 18:12 Antworten mit ZitatNach oben 

Das läuft nicht unter plus 1.3, da hier ein anderer Kalender installiert ist.
Demo (sofern Interesse): http://www.oxpus.de

_________________
Karsten Ude
Support nur im Forum! || Support just on Forum!
OXPUS's Mods
HiddenBenutzer-Profile anzeigenPrivate Nachricht sendenE-Mail senden
CICarScene
phpBB2.de User
phpBB2.de User



Anmeldungsdatum: 23.07.2004
Beiträge: 6

BeitragVerfasst am: Fr 31 Dez, 2004 14:23 Antworten mit ZitatNach oben 

I dont suppose you could work on an ezportal addon that would work with topic calendar by Ptirhiik?
OfflineBenutzer-Profile anzeigenPrivate Nachricht sendenWebsite dieses Benutzers besuchen
Beiträge der letzten Zeit anzeigen:      
Dieses Forum ist gesperrt, du kannst keine Beiträge editieren, schreiben oder beantworten.Dieses Thema ist gesperrt, du kannst keine Beiträge editieren oder beantworten.

Nächstes Thema anzeigen
Vorheriges Thema anzeigen
Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst Dateien in diesem Forum posten
Du kannst Dateien in diesem Forum herunterladen

Ähnliche Beiträge
Thema Autor Forum Antworten Verfasst am
ezportal admin problem bzw frage;P Woodstock23 phpBB2.x - MOD Support 2 Mo 08 Sep, 2008 12:50 Letzten Beitrag anzeigen
Kalender: Wiederholbare Events? elvoges Support allgemein 0 Di 06 Mai, 2008 13:59 Letzten Beitrag anzeigen
EZPortal Konfiguration Klausirelli Support allgemein 3 Sa 02 Feb, 2008 13:53 Letzten Beitrag anzeigen
Komende Events oben im Portal Ercanxxx Support allgemein 2 Mi 19 Dez, 2007 01:10 Letzten Beitrag anzeigen
Ezportal - Je nach Forum-Id unterschi... Peal phpBB2.x - Support 3 Mi 05 Dez, 2007 15:06 Letzten Beitrag anzeigen