collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 513
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Author Topic: Need some help with the header block arrangement  (Read 4326 times)

0 Members and 1 Guest are viewing this topic.

Offline mane-kun

  • Newbie
  • Posts: 4
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Need some help with the header block arrangement
« on: June 03, 2012, 12:28:50 AM »
Well, I'm not completely sure if this post belongs here since is my first post in this community, but basicaly I need some help making my portal look like this guy's website: This website
He's got it like that for articles, I'd like to have the same thing for my blocks, the header block in specific, so whenever I create a new topic on the board I have set up to show in the portal, it will automaticaly rearrange like that on the main page while actually having more pictures and stuff like that on the original post... I don't know if I'm making myself clear.

If you take a look at that link I just posted, you'd see how there's a picture on the left and a small introduction to the post in text, and then you can clik on the post and see that there's more than one picture, but somehow his portal is only taking one of them for the main page (or article page on this case), I'd like to be able to do the same thing if possible, and since I don't have a great knowledge when it comes to something so intricate, I need somebody's help if possible.
My SMF version is 2.0.2 and my SP version is 2.3.5.
Thanks in advance for your answers :3

Offline mane-kun

  • Newbie
  • Posts: 4
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Need some help with the header block arrangement
« Reply #1 on: June 08, 2012, 02:46:16 AM »
Okay, I've messing around with this, trying to solve it myself, I saw a couple of posts that wanted the same thing I do (http://simpleportal.net/index.php?topic=10766), but they didn't get any straight answer either, so now what i need is if anybody knows where can I get rid of the pictures on the ['body'] tag in PortalBlocks.php but only on the portal, not the whole site... I was thinking that maybe i can "make" another tag (ie: ['thumb']), and make it show the 1st picture from that particular post before the ['body'] tag, so it will basically show:

The content of the post in text only and a limitation of say 200 characters
text text text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text text text

Now, when you acces the actual post, it should be displayed with more pictures and stuff, I don't know if I'm making myself clear.

So please, if anybody has any clue on how to do this by modifying maybe the portalblocks.php or something like that, I would really appreciate it.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Need some help with the header block arrangement
« Reply #2 on: June 08, 2012, 09:40:37 AM »
This could be done with some combination of php ( and maybe js.)
Just as portal resizing is now done, using php to "tag" images with class="<something>", and then javascript is used to resize that image when it appears in a portal block (articles or boardnews) or in the portal-page articles.
You want
1) Some specialty articles or boardnews block.  I'm not sure which you are using
2) Some class to use. Call it what you like. "sp_floatleft", for example.
3) Have your custom block apply the sp_floatleft to every image when it applies the posts. Or, if you are very clever with the regexp, only to the first img in the posts.
4) Use the [.cutoff.] tag before the second image in the post, show only 1 img shows on the portal page every time.
5) Use some CSS (you could add it to portal.css) to control how that tag will appear for that special new class -- use float:left; use width: and height;
6) If you run into problems with CSS precedence (your width settings are over-ruled by other width settings for bbc tags), you might have to use some js, like what Simple Portal uses for portal resize.  But DO NOT cross that bridge until you come to it.
 
That sounds like a plan to me.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline mane-kun

  • Newbie
  • Posts: 4
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Need some help with the header block arrangement
« Reply #3 on: June 14, 2012, 10:17:50 PM »
Thanks for the reply, I've got almost everything figured out... I was able to apply the floatleft style for only the pictures in the portal, it's actually quite easy when you know how to do it... Now I'm just having a little bit of trouble with showing only the first picture of the post.
Here's how I managed to make the pictures float to the left:

PortalBlocks.php

Code: (find) [Select]
$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'],

Code: (add after) [Select]
'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>', (<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) [Select]
<div class="post">', $news['body'], '</div>
Code: (replace with) [Select]
<div class="post">', $news['imagen'], ' ', $news['body'], '</div>
Any ideas on how can I add the ['cutoff'] tag into that?

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Need some help with the header block arrangement
« Reply #4 on: June 15, 2012, 10:37:05 AM »
I would suggest applying the cutoff tag directly in the post itself.  That would be easiest.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?