SMF Support > SMF 2.0.x Support

Need some help with simpleportal's header block arrangement

<< < (3/3)

mane16:
Ok, I've managed to make the pictures align left, now I just need to find out how to call the 1st picture of the post only... Anybody's got any clue on how to do this (I remind that this will only be needed for the "portal" and nothing else.
Here's how I managed to change the structure/arrangement of the portal in case anybody is looking to do it themselves:

PortalBlocks.php


--- Code: (find) ---$return[] = array(
'id' => $row['id_topic'],
'message_id' => $row['id_msg'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
'subject' => $row['subject'],
--- End code ---


--- Code: (add after) --- 'imagen' => '<div style="float: left; margin: .5ex 1ex 1ex 1ex;"><a href="', $news['image'], '"><img src="', $news['image'], '" alt="', $news['subject'], '" class="news_image" /></a></div>',
--- End code ---
(<a href="', $news['image'], '"></a>) This is just to fix a problem when displaying the portal in google chrome and internet explorer, which shows the icon for a missing picture before the actual post pictures...

After that I added this function before the ['body'] tag like so:


--- Code: (find) --- <div class="post">', $news['body'], '</div>
--- End code ---


--- Code: (replace with) --- <div class="post">', $news['imagen'], ' ', $news['body'], '</div>
--- End code ---

Fog:
Mane16 it appears that forum uses a standalone page for their portal and articles.

mane16:

--- Quote from: Fog on June 23, 2012, 07:44:22 PM ---Mane16 it appears that forum uses a standalone page for their portal and articles.

--- End quote ---
indeed my good sir, is the simpleportal mod, which has different .php documents with different settings depending on what you want to modify, like on this case, any changes that you want to make to the main portal page, you would need to modify portalblocks.php or in some cases portalblocksadmin.php, the thing is, is there any way that I could call just the first picture to the portalblocks.php document, which is basically the main portal page that you would see on your webpage "home" basically, and if not directly there, maybe I could create a bbc tag like [*img][*/img] perhaps, but that would only call the first picture, instead of all in the post...
Did I explain myself? XD

Fog:

--- Quote from: mane16 on June 23, 2012, 09:08:00 PM ---
--- Quote from: Fog on June 23, 2012, 07:44:22 PM ---Mane16 it appears that forum uses a standalone page for their portal and articles.

--- End quote ---
indeed my good sir, is the simpleportal mod, which has different .php documents with different settings depending on what you want to modify, like on this case, any changes that you want to make to the main portal page, you would need to modify portalblocks.php or in some cases portalblocksadmin.php, the thing is, is there any way that I could call just the first picture to the portalblocks.php document, which is basically the main portal page that you would see on your webpage "home" basically, and if not directly there, maybe I could create a bbc tag like [*img][*/img] perhaps, but that would only call the first picture, instead of all in the post...
Did I explain myself? XD

--- End quote ---

You don't have to edit anything in SMF whether its the forum or simpleportal.  Create a html page and use that url as your standalone.  If you do that, you won't have the default nav bar.  If you want to create a page under the simpleportal admin, one could use that url as your standalone and you would have the default nav bar.

I guess you could use PHP on your stand alone but you shouldn't have to modify any PHP file on smf to do what you see on that other site.

That other site has a simple header and two column with a footer format that you can create with html or css depending on your ability.

Navigation

[0] Message Index

[*] Previous page

Go to full version