• [MOD] Kalender / Calendar (by Cr@zy Sash) 4 0 5 1
Currently:  

Author Topic: [MOD] Kalender / Calendar (by Cr@zy Sash)  (Read 87161 times)

0 Members and 2 Guests are viewing this topic.

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Kalender / Calendar (by Cr@zy Sash)
« Reply #60 on: August 16, 2007, 04:06:42 PM »
This calendar linux base ... no work on windows ... right way is:

Code: [Select]
$dat0 = mktime(0, 0, 0, date("m", $dat)  , date("d", $dat)-$sub, date("Y", $dat));
$dat0 = (isset($dat0)) ? getdate($dat0) : "";

2nd line of page_header.php file.

8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline griffdsp

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [MOD] Kalender / Calendar (by Cr@zy Sash)
« Reply #61 on: September 30, 2008, 03:41:33 PM »
I am having problems with this mod. It displays correctly everywhere but the error is only showing up when you go on the "search" functions and the "new images" function. It throws up the following error before displaying the correct content at the bottom. i am using version 1.7.6. I have tried all the fixes mentioned in this topic but to no avail so can anyone help


Code: [Select]
Notice: Use of undefined constant mon - assumed 'mon' in /is/bla bla/www/gallery/includes/page_header.php on line 505

Notice: Use of undefined constant mon - assumed 'mon' in /is/bla bla/www/gallery/includes/page_header.php on line 506

Notice: Use of undefined constant mon - assumed 'mon' in /is/bla bla/www/gallery/includes/page_header.php on line 507

Notice: Use of undefined constant mon - assumed 'mon' in /is/bla bla/www/gallery/includes/page_header.php on line 508

(etc etc etc)


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Kalender / Calendar (by Cr@zy Sash)
« Reply #62 on: October 01, 2008, 02:13:13 AM »
in step 1 use this code instead:

//----------------------------------------------------- 
//--- Calendar ---------------------------------------- 
//----------------------------------------------------- 
$dat time(); 
$dat0 getdate($dat); 
$datj=$dat0['month']." ".$dat0['year']; 
$calshow=""
if(
$calshow==""){$calshow=$dat0['month']." ".$dat0['year'];} 
$dath=$calshow
$dat5="1 ".$dath
$dat1 getdate(strtotime($dat5)); 
$dat2 getdate(strtotime($dat5." -1 month")); 
$datr=$dat2['month']." ".$dat2['year']; 
$dat3 getdate(strtotime($dat5." +1 month")); 
$datv=$dat3['month']." ".$dat3['year']; 
$erster=$dat1['wday']; 

if(
$erster!=1){ 
  if(
$erster==0){$erster=7;} 
  
$calendar_data "<tr>"
  for(
$i=0;$i<$erster-1;$i++){$calendar_data .= "<td class=\"smalltext\">&nbsp;</td>";} 
  } 
for(
$i=1;$i<=31;$i++){ 
  
$dat4 getdate(strtotime($i." ".$dath)); 
  
$heute=$dat4['wday']; 
  if(
$heute==0){$heute=7;} 
  if(
$dat1['mon']==$dat4['mon']){ 
    
$stil="calat"
    
$dum1=$dat0['mday'].".".$dat0['mon'].".".$dat0['year']; 
    
$dum2=$dat4['mday'].".".$dat4['mon'].".".$dat4['year']; 
    if(
$dum1==$dum2){ 
      if((
$heute==6) || ($heute==7)){$stil="calht";}else{$stil="calht";} 
      } 
      else{ 
      if((
$heute==6) || ($heute==7)){$stil="calwe";}else{$stil="smalltext";} 
      } 
    if (
$i<=9){$k="0";}else{$k="";} 
    if(
$heute==1){$calendar_data .= "<tr>";} 
    
$calendar_data .= "<td align=\"center\" class=\"".$stil."\">".$k.$i."</td>"
    if(
$heute==7){$calendar_data .= "</tr>";} 
    
$j=$heute
    } 
  } 
if (
$j!=7){ 
  for (
$i=0;$i<7-$j;$i++){$calendar_data .= "<td class=\"smalltext\"></td>";} 
  
$calendar_data .= "</tr>"
  } 
$calendar_data .= "</table></td></tr></table></td></tr></table>";
« Last Edit: October 02, 2008, 02:14:46 AM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline griffdsp

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [MOD] Kalender / Calendar (by Cr@zy Sash)
« Reply #63 on: October 01, 2008, 07:02:20 PM »
problem is almost solved. i needed to remove some of the table tags at the bottom to keep to the design of the page but its still showing 3 errors. 2 pertaining to line 510.
From what i can tell its now not showing the month just the year. These are the errors.

Notice: Undefined variable: month_txt - assumed 'mon' in /is/bla bla/www/gallery/includes/page_header.php on line 510

Notice: Use of undefined constant year - assumed 'year' in /is/bla bla/www/gallery/includes/page_header.php on line 510

This is the actual line 10

"lang_calendar_head" => $month_txt." ".$dat0[year],

there is also another error showing

Notice: Undefined variable: calshow in /is/bla bla/www/gallery/includes/page_header.php on line 464

this is my actual line 464

f($calshow==""){$calshow=$dat0['month']." ".$dat0['year'];


 i am getting a similar error plus a few more for the report image mod as well within the same "new images" and "search" functions although i have not had time to search yet to see if the problem was fixed in the forums.
« Last Edit: October 01, 2008, 07:27:19 PM by griffdsp »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Kalender / Calendar (by Cr@zy Sash)
« Reply #64 on: October 02, 2008, 02:18:08 AM »
This is the actual line 10

"lang_calendar_head" => $month_txt." ".$dat0[year],

Where did that line came from? I don't see anything about it in the installation instructions.


there is also another error showing

Notice: Undefined variable: calshow in /is/bla bla/www/gallery/includes/page_header.php on line 464

this is my actual line 464

f($calshow==""){$calshow=$dat0['month']." ".$dat0['year'];
I've updated my post above, should solve this problem.

As of other similar messages, you must have changed global.php to show all messages.
By default its:
error_reporting(E_ERROR E_WARNING E_PARSE);

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline griffdsp

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [MOD] Kalender / Calendar (by Cr@zy Sash)
« Reply #65 on: October 02, 2008, 12:52:24 PM »
ok after a while playing around i have managed to get the errors removed. i have had to revert to the original mod instead of showing the month and year its now showing just simple calendar.

but at least its working now. Thanks for all your help!

The remaining errors from the report image mod are from the functions php and are "undefined index: report_image_status in bla bla". This is due to an addition to the mod made by member cookie at the bottom of page 4 of the mod (second to last post) which without the errors is highly useful (http://www.4homepages.de/forum/index.php?topic=11447.45)

should i post in the correct place with this error?

 The global.php line you mentioned is exactly what you said it should be
« Last Edit: October 02, 2008, 05:22:06 PM by griffdsp »

Offline crs

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: [MOD] Kalender / Calendar (by Cr@zy Sash)
« Reply #66 on: May 01, 2009, 01:38:35 AM »
Wäre es möglich, dass User Events in diesen Kalender eintragen können?
Zu diesen Events können sich dann andere User eintragen, dass Sie daran teilnehmen...

Wäre Super