Support Forum

Modding question

28 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

When the page goes completely blank it virtually always points to a PHP fatal error suggesting you have typed something in your code incorrectly or used characters in the php code that are not allowed (like Word Processing quote for example instead of plain text quotes).

This will; also almost certainly show up in your php error log and probably your forum error log as well and will give a good idea of hat the error is.

IK Ike
Ike
Member

Oh – the quote marks you have around the ‘sp_ColumnStart’ arguments there are rich text – curly. They need to be plain text – straight.

It’s always best to use the syntax highlighter, I was going to say earlier but thought I’d put enough information on the screen!

You should try and preserve the code and not copy and paste from various places / web pages. Always try and use the ‘View Source’ button where possible, here we have ‘View Raw Code’ above code snippets.

When you paste code here, highlight it and click the syntax highlighter (last icon on the right at the top of the editor toolbar, looks like a sheet of paper with 2 curly braces) and pick ‘PHP’.

If that was the problem, make sure you always use a plain text editor like notepad or notepad ++ or equivalent.

AT Alex T
Alex T
Member

Hmmm…I copied your code and used notepad++ to edit the code and it went to a blank page.  

Here’s the code copied from notepad:

Overlay:

# FORUM VIEW ========================

$ColForum_1 = array();
$ColForum_2 = array();
$ColForum_3 = array();
$ColForum_4 = array();

$ColForum_1[0] = ‘5%’;
$ColForum_1[800] = ‘6%’;
$ColForum_1[720] = ‘7%’;
$ColForum_1[600] = ‘0%’;
$ColForum_1[480] = ‘0%’;
$ColForum_1[360] = ‘0%’;

$ColForum_2[0] = ‘45%’;
$ColForum_2[800] = ‘47%’;
$ColForum_2[720] = ‘47%’;
$ColForum_2[600] = ‘48%’;
$ColForum_2[480] = ‘48%’;
$ColForum_2[360] = ‘48%’;

$ColForum_3[0] = ‘39%’;
$ColForum_3[800] = ‘46%’;
$ColForum_3[720] = ‘44%’;
$ColForum_3[600] = ‘48%’;
$ColForum_3[480] = ‘48%’;
$ColForum_3[360] = ‘48%’;

$ColForum_4[0] = ‘3%’;
$ColForum_4[800] = ‘3%’;
$ColForum_4[720] = ‘3%’;
$ColForum_4[500] = ‘5%’;
$ColForum_4[480] = ‘0%’;
$ColForum_4[360] = ‘0%’;

$ColForum_5[0] = ‘5%’;

Forumview:

# Column 2 of the topic row
# ———————————————————————-
sp_ColumnStart(‘tagId=spColForum2&tagClass=spColumnSection spLeft&width=0&height=0px’);
sp_TopicIndexName(‘tagClass=spRowName’, __sp(‘Browse the thread %NAME%’));
if (function_exists(‘sp_TopicDescription’)) sp_TopicDescription();
sp_TopicIndexFirstPost(‘iconClass=spIcon spLeft&icon=sp_ArrowRightSmall.png&nicedate=0&date=1&time=1&stackdate=0&stackuser=0&stackdate=0&itemBreak= – ‘, __sp(‘Started By’));
sp_InsertBreak();
if (function_exists(‘sp_TopicIndexTagsList’)) sp_TopicIndexTagsList(‘tagClass=spTopicTagsList spLeft&delimiter=|&delimiterClass=spTagsDelimiterForum&collapse=0&iconClass=spIcon’, __sp(”), __sp(‘Show the tags for this topic’));
if (function_exists(‘sp_TopicIndexRating’)) sp_TopicIndexRating(‘tagClass=spStatusIcon&spRight&skipZero=1’);
sp_ColumnEnd();
sp_ColumnStart(‘tagId=spColForum5&tagClass=spColumnSection spLeft&width=0&height=0px’);
if ($spThisForum->unreads > 0) sp_AddIcon(‘tagClass=spRowIcon spRight&icon=sp_Unread.png’);
sp_ColumnEnd();
sp_InsertBreak(‘tagClass=groupBreak’);

# Column 3 of the forum row

IK Ike
Ike
Member

Yes – Like I said your quote marks are incorrect.

The only example I could find was the double quote, but the same applies to single quotes.

Unless it’s because you are not using the syntax highlighter as I mentioned above, if you could repost the code using the highlighter it would confirm whether they are wrong or right.

AT Alex T
Alex T
Member

Hmmm…i’m not sure why the code shows up like that?  I copied the code, from notepad, clicked on syntax highlighter and chose PHP.  Never shows up like yours? 

IK Ike
Ike
Member

I’m not sure why we are seeing it as ‘view code’ in no container rather than ‘view raw code’ in the syntax highlighter container..

When you copied the code from one of our posts above, did you highlight the whole block and manually delete the 1, 2, 3 list? Or did you ‘View Raw Code’ and copy it from there?

I just tried copying the block as you see it in a post and it does break the quote marks making them rich text.

AT Alex T
Alex T
Member

Ha!  I figured it out. In reply 12 your code has the incorrect quote.  I just changed it and the forum does not go blank, however the png does not show.  

IK Ike
Ike
Member

So which folder is your .png in?

Can you look at the page source to see if it loads the image?

AT Alex T
Alex T
Member

The png is in the main reboot images folder.  I loaded the png in both the reboot and child folder.  Checked the source and do not see it loading.  Do I have to copy every image in the reboot child folder as well?

MP Mr Papa
Mr Papa
Member

late to game and have not read the whole thread…  but you should only have to load the image in the child folder… it searches there first and wont search the parent if found…

AT Alex T
Alex T
Member

I placed the image in both the reboot and reboot child.  It still will not show up?

IK Ike
Ike
Member

Just for your information, using the data inspector in the Forum > Toolbox, you can select whatever data a page is using to display on the page itself, so you can find what you need to reference. For forum view if you enable spThisTopic to display (under Forum View Data), when you view the forum page you will see all data, and can pick out what you need to use.

So, for this to display the image for individual topics with unread posts, try:

if ($spThisTopic->unread > 0) sp_AddIcon('tagClass=spRowIcon spRight&icon=sp_Unread.png');
AT Alex T
Alex T
Member

Ike said
Just for your information, using the data inspector in the Forum > Toolbox, you can select whatever data a page is using to display on the page itself, so you can find what you need to reference. For forum view if you enable spThisTopic to display (under Forum View Data), when you view the forum page you will see all data, and can pick out what you need to use.

So, for this to display the image for individual topics with unread posts, try:

<br />
if ($spThisTopic->unread > 0) sp_AddIcon('tagClass=spRowIcon spRight&icon=sp_Unread.png');
<br />

Awesome, this now works!  How can I fix the spacing in the picture below?  I need to shift the yellow arrows to the left a bit so the div breaks may match, as well as the icon on the right.

MP Mr Papa
Mr Papa
Member

for these kind of css issues, its best to use the inspector function of  your browser…  you can inspect the element and see what is driving it…  typically you can also what if your changes until you have it right, then just make the css changes…

especially since you want to change the spacing above the +1 image you added… so whatever class is applied image container, remove some margin or padding…  with a link, we could probably offer some guidance…

or do you mean why is the row with the image shifted?

in the code I gave you, I had you add a column all the time, image or not so stuff aligned…  did you do that?  it appears you just output an icon vice putting in a column to keep things aligned…