Yet Another Portal Question - NBS






 

 

Yet Another Portal Question - NBS

View Full Version : Yet Another Portal Question


Valethar
16-Jan-2003, 12:03 PM
M3NF,

How do I change the birthday/calendar images on the portal?

I attempted to alter the skin_portal.php file (I think that was it) and substiture the A_BIRTH and A_CAL macros for the F_ACTIVE macros, but it didn't work.

I got the following error messages when I tried it.



Parse error: parse error, unexpected $ in /usr/local/psa/home/vhosts/roguesociety.net/httpdocs/forum/Skin/s17/skin_portal.php on line 503

Fatal error: Cannot instantiate non-existent class: skin_portal in /usr/local/psa/home/vhosts/roguesociety.net/httpdocs/forum/sources/Portal.php on line 73


I'm fairly certain that's what I need to edit, but I can't get it to behave. :(

M3NF
16-Jan-2003, 12:30 PM
Ok the file you need to change is in /root/skin/s# again this will need to be done for all the S# folders


open the skin_portal and the part you need to change is here.....

function stats_birthdays($birthusers="", $total="", $birth_lang="") {
global $ibforums;
return <<<EOF
&nbsp; &nbsp; &nbsp; &nbsp;<tr>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <td class='category' colspan='2'>{$ibforums->lang['birthday_header']}</td>
&nbsp; &nbsp; </tr>
&nbsp; &nbsp; <tr>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td class='forum1' width='5%' valign='middle'><{A_BIRTH}></td>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td class='forum2' width='95%'><b>$total</b> $birth_lang<br>$birthusers</td>
&nbsp; &nbsp; &nbsp; &nbsp;</tr>
EOF;
}

function calendar_events($events = "") {
global $ibforums;
return <<<EOF
&nbsp; &nbsp; &nbsp; &nbsp;<tr>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <td class='category' colspan='2'>{$ibforums->lang['calender_f_title']}</td>
&nbsp; &nbsp; </tr>
&nbsp; &nbsp; <tr>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td class='forum1' width='5%' valign='middle'><{A_CAL}></td>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<td class='forum2' width='95%'>$events</td>
&nbsp; &nbsp; &nbsp; &nbsp;</tr>
EOF;



you can see the part for the cal and birthday in same area just conferm that the same macro are used as in the skin.


I lost your messgae during the move, so if you need any more help plz just post me again m8

Valethar
16-Jan-2003, 01:29 PM
I'll give it a try again :)

Don't worry about the messages. I lost a few posts I made to the boards right about then too. :/

I'll make a post in a bit with my other questions (fewer than planned, as I've figured out some things from nosing around in the files.) as soon as I've had a chance to catch a few hours sleep.

Going on about 20 hours awake, and feeling the burn! Oh to be about 20 years younger! :lol:

Valethar
16-Jan-2003, 09:24 PM
Got it to work.

Somewhere in the back of my addled brains, an ancient memory floated to the surface. I gave it a shot, and that did the trick!

Some years back, I used to manage a role-playing games forum on Delphi. Their systems, at the time, were all VMS VAXen, and they were quite particular about files being saved in a specific way. If you didn't save them with the proper type of line break, they didn't work as planned.

Apparently not all line breaks are created equal. :) The FTP servers (much like my old VAX friends) require files to be saved with UNIX line breaks. Saving the files (for me at least) as standard Mac formatted text files confuses the server, because the line breaks are different.

Guess it took a marathon session of playing with the code to remember that one... :blush: Despite the burning eyes and headache, that 22+ hour run had it's advantages.

I'll post something on the open boards covering this, so that others may benefit.

I've a couple other questions about how you set up your portal, with regard to some of the blocks in it. However, to preserve continuity (and the sanity of those who may read this after us) I'll ask them in a different thread. :D


Resolved