SimplePortal

Started by SimplePortal Team, March 10, 2008, 11:16:07 PM

Previous topic - Next topic

MrCreatoR

Yoshi2889 [?]
QuoteHow can you even visit a deleted topic?
By link from old topic.

QuoteOr do you have a recycling board?
And thats also, but this is happening even if the topic is deleted from recycle board.

Quoteif you are still running SMF 2.0 RC1.2, you should upgrade to 2.0.2 straight away.
If that was so simple...

Btw, my SimplePortal version is 2.2, could you please help me with my issue?

P.S.
I am currently recreating my forum base on SMF 2.0.2, and installed latest SP, i have not this kind of issue there, but meantime, while i am at the updating process, i wanted to solve this issue on the old (current) forum.

Angelina Belle

Mr. Creator:

The problem seems like it could be caused by a custom php block which is used on the page where the "topic has been deleted or is off-limits to you" message is shown.  I am guessing this because of the reference to eval'd code.

Please give a sample URL where you see the problem.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

MrCreatoR

AngelinaBelle [?]
QuotePlease give a sample URL where you see the problem.
http://autoit-script.ru/index.php/topic,8915.0.html
But i suppose you will see the login box instead.

Angelina Belle

Yes -- just a login box. If you create a temporary account for me, I will be happy to look.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

MrCreatoR


Angelina Belle

First, I went to
http://autoit-script.ru/index.php/

I copied the HTML from that page to http://validator.w3.org/#validate_by_input
There were very many errors.  I would recommend you work on reducing the number of HTML errors on the page.

Then I went to http://autoit-script.ru/index.php/topic,8915.0.html and saw exactly the error you described.
I see that this does not seem to be related to any simple portal block.

Can you share with me your file Load.php, so I can be sure what is on line 2284?
That function sp_embed_image should be found in the file Subs-Portal.php. Do you have the file Subs-Portal.php?
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

MrCreatoR

[?]
QuoteCan you share with me your file Load.php, so I can be sure what is on line 2284?
Attached.

QuoteThat function sp_embed_image should be found in the file Subs-Portal.php. Do you have the file Subs-Portal.php?
I have Subs-SPortal2.php, and the function sp_embed_image is there.

Angelina Belle

This problem occurs while loading a template for this page, when the topic is gone ($txt[''topic_gone'])
I cannot understand why this is a problem only when viewing a deleted topic.
It would be a little bit tricky to figure this out.

My advice is that it would probably be easier to upgrade your SMF and your SimplePortal than to figure out the reason for this problem.
If I were going to try to figure this out, I would start putting some debugging statements into Load.php.
Before line 2284, I would put in

echo '<br />
function template_include evaluating file ', $filename, '
<br />';

Then I would see what I could learn, and try to follow the problem from there, probably to line 233 of $filename.
I would work this way because I am not very experienced with SMF and its templates.
Someone with more experience might get to the bottom of the problem more quickly.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

MrCreatoR

AngelinaBelle

Thank you very much!

Found the problematic line of code, in index.template.php:
Quote<li>', sp_embed_image('dot'), ' <strong><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></strong></li>

Then i figured out that there is no mention of that function in this php, and it should be read from Subs-SPortal2.php. So i added require_once($sourcedir . '/Subs-SPortal2.php'); to the beginning of the php and the error is gone, but there is still some bug with reading the images of the dots, because $settings['sp_images_url'] for that php is empty for some reason.

MrCreatoR

Ok, the issue with dots fixed by replacing $settings['sp_images_url'] . '/' with $settings['images_url'] . '/sp/'. And also there was a text strings issue, also fixed by adding loadLanguage('SPortal'); to the php.


P.S.
I know all this is temporary and lame solutions, but atm it's all i need, until i update the forum.

edcplanet

Is there a way to have the "Recent Image Attachment" block provide a link to the post where the images are attached to?

Angelina Belle

MrCreatoR:

I'm glad you found it.  Make sure, when you do upgrade, that you allow the package manager to edit your theme files.
If the install fails for some of your custom themes, you should be able to take careful notes of the failed sections, and make the additional changes by hand.  It will amount to the same sort of editing you've done already, but the information on which files, what needs to be added, and approximately what you should be looking for to find the correct spot to add it too should speed things up considerably.

edcplanet:
Yes -- if you customize the php code for the block.
You would want to change the code in function sp_attachmentImage, in PortalBlocks.php. You would want to sneak $item['topic']['link'] into the output somewhere. 

How did I know $item['topic']['link']  would be available to you?  I looked in the file SSI.php, in the function ssi_recentAttachments (which you can see sp_attachmentImage calls to get all the information it puts out), to see all the stuff it stuffs into the $attachments array.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

distante

I have a problem loading with the titles in the portal, I think the words won't be enough, see : http://www.musicaysonido.com/foro/index.php

For some reason, the portal isn't load the sprites images...

I'm using this theme : http://custom.simplemachines.org/themes/index.php?lemma=2437, recently updated 2.0.2 smf

Any Ideas?

Pd: just in case, I copied the portal.css and portal_rtl.css files into my theme css dir.

Angelina Belle

distante -- I have replied to your post at simpleportal.net.

In essence -- your theme is almost, but not quite, compatable with SimplePortal.  This is because it does not keep all of its files in main_block.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

netpaydays

Just a couple questions regarding this mod. My php skills are elementary.


What is the purpose of the SPortal.php  file? Is this where the individual scripts are written to make the mod work?

and

What is the purpose of the SPortal.template.php file? Is this the file that   formats the page layout?  (i.e.  where you can move blocks around and edit them)?


I learn code by trial and error.  In your opinion, would it be difficult for a beginning PHP coder to change the random gallery script to display recent attached images that are attached to posts?

thanks again for your fine work with this mod

Exodus111

I would love to see some examples of SMF simplePortal sites out there.

-Exo

All Colours Sam

The SimplePortal own site is an example for itself: simpleportal.net, they have a showcase board too.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

Angelina Belle

netpaydays -- I would answer "Yes" to all three of your questions.
I would also add that there are several SimplePortal files in your sources directory.
And additional simpleportal template files in your theme directory.

Making that kind of change would not be too difficult.
I would start in PortalBlocks.php.
You will see that the gallery block calls code from the gallery mod itself. Exactly how to make the change you want -- you need to look at the gallery mod itself for how to do it.

Others have done similar things, and posted about it at simpleportal.net.  You might find something interesting by doing a little search there.

Best of Luck!
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Trim4

how do you make the wrapper 50% transparent?

TheListener

Quote from: Exodus111 on March 11, 2012, 07:42:06 AM
I would love to see some examples of SMF simplePortal sites out there.

-Exo

As Suki has said on www.simportal.net we have a Showcase board where you can see other users Portals.

You can see mine at www.broadstarradio.com

Advertisement: