SimplePortal

Customization => Themes and Graphics => Topic started by: swtdivalove on September 25, 2009, 09:43:38 PM

Title: Block Theming
Post by: swtdivalove on September 25, 2009, 09:43:38 PM
I want to totally customize the blocks.

With that in mind, I believe if there were a way to look at the coding through the admin for just the HTML portions of the block, it would make things much easier to change the block HTML.

So, the question I have is where can I change the coding of the HTML so I may change the look-n-feel of the blocks in the most simplistic of ways.
Title: Re: Block Theming
Post by: Nathaniel on September 25, 2009, 10:24:31 PM
At the moment there is no such editor, although it is an idea that is on the Development teams radar, as one of the things to do in the future.

You can use the style options when you edit a block, they give you some control over it.

For now, you will have to change blocks html/php code, which is located within the 'sources/PortalBlocks.php' file.
Title: Re: Block Theming
Post by: swtdivalove on September 29, 2009, 03:28:43 PM
Any idea on a time frame?

It would be much easier to implement faster, more effecient revisions for you all as well as the rest of us.  Once you have the function set, then make a call to the template and then display the block instead of displaying all the html into each function.  It would cut down on file size overhead when doing it this way, and increasing the script speed.
Title: Re: Block Theming
Post by: Nathaniel on September 29, 2009, 08:17:23 PM
Any idea on a time frame?

It would be much easier to implement faster, more effecient revisions for you all as well as the rest of us.  Once you have the function set, then make a call to the template and then display the block instead of displaying all the html into each function.  It would cut down on file size overhead when doing it this way, and increasing the script speed.

At the moment we don't have any specific timeframe, I will say that it isn't planned for the next major version - 2.4 - which will mainly be adding a forum independant articles system. The major version after that (3.0?) is where we plan to add this feature, hopefully it will be done over the summer (southern hemisphere, winter for the norther hemisphere), although I'm not going to set a specific date, because we currently don't know how long it will take.

The main reasons for implementing a block editor, would be to make it  easier for users (and devs) to customize their blocks types, create new block types, share block types, etc.

The dev team is aware that having every single block in the same file is not a particularly good way of doing things, for several reasons. We intend to separate each block type into a separate file, with 'source', 'template' and 'language' functions, so that should help speed things up by cutting down the file size overhead. It should also mean that users don't have to worry about losing edits to block types when they upgrade SP versions.

Anyway, enough rambling on. ;)
Title: Re: Block Theming
Post by: swtdivalove on October 02, 2009, 09:37:17 PM
Thanks Nathaniel! :)
Title: Re: Block Theming
Post by: swtdivalove on October 27, 2009, 11:39:22 PM
Ugh!  This is one of the very last things I have to accomplish at the moment.  I'm struggling VERY badly with this because of how the template for it is working into the coding of PortalBlocks.php.

Is there someone willing to help me recode the PortalBlocks.php so it will work with what I am attempting to do?
Title: Re: Block Theming
Post by: Nathaniel on October 28, 2009, 02:44:33 AM
Well, if there are very specific things that you are having problems with, then post the problem and someone may be willing to help.

What exactly are you trying to change?

If you are trying to rewrite that the entire file, that is quite a bit of work.

If you are trying to change the general look of all the blocks (at the same time), then have a look at the 'Themes/default/Portal.template.php' file, that contains the general code which contains the blocks (as opposed to the specific code for each block type).
Title: Re: Block Theming
Post by: swtdivalove on October 28, 2009, 10:58:33 AM
That partly did it, but now I have to find the rest of the code that handles the portal.
Title: Re: Block Theming
Post by: Nathaniel on October 28, 2009, 06:06:33 PM
That partly did it, but now I have to find the rest of the code that handles the portal.

What part of the code? If you can explain it a bit more then I can point you in the right direction.
Title: Re: Block Theming
Post by: swtdivalove on October 28, 2009, 07:20:19 PM
http://www.dreamlikeent.com (http://www.dreamlikeent.com)

If you look at the center stuff, that's what I'm trying to figure out.

Want to make it look like the blocks on the left.
Title: Re: Block Theming
Post by: Nathaniel on October 28, 2009, 10:59:16 PM
Well, if you are using articles to show those topics then you want the 'Themes/default/PortalArticles.template.php' file, if you are using the Board News block type, then search for the 'sp_boardNews' function in the 'sources/PortalBlocks.php' file.
Title: Re: Block Theming
Post by: swtdivalove on October 29, 2009, 10:16:21 AM
Thanks! :)  I'll dig around later today. :)
Title: Re: Block Theming
Post by: swtdivalove on October 29, 2009, 02:02:40 PM
AHA! :)  Take a look when you get a chance! :)

Still a lot more work to do though! :)
Title: Re: Block Theming
Post by: swtdivalove on October 30, 2009, 11:09:18 PM
Ran into a little bit of an issue... Is that the themeing I did only works when signed in.  It doesn't work if someone is logged out.
Title: Re: Block Theming
Post by: swtdivalove on November 01, 2009, 07:21:20 PM
**BUMP**
Title: Re: Block Theming
Post by: Nathaniel on November 02, 2009, 06:24:11 PM
Which specific "theming"? Can you please post screenshots comparing a guests view to the view that a person who is logged in can see?
Title: Re: Block Theming
Post by: swtdivalove on November 03, 2009, 02:27:15 AM
The blocks when someone is a guest, shows up under the standard theme, but when logged in it looks as they are suppose to.

As for screen shots?  Not till I get my regular comp back online.
Title: Re: Block Theming
Post by: Nathaniel on November 03, 2009, 02:38:29 AM
The attached image is what I see when I look at your website as a guest. It looks like your customized edits are there to me.
Title: Re: Block Theming
Post by: swtdivalove on November 04, 2009, 10:25:56 AM
The blocks on the left should look like the center news section, even as a guest.
Title: Re: Block Theming
Post by: swtdivalove on November 06, 2009, 12:26:14 PM
bump
Title: Re: Block Theming
Post by: Nathaniel on November 06, 2009, 05:56:34 PM
Do you have the 'Hide SMF Version' mod installed? If so, then try moving the code that it adds to your index.php file (see below) to after the SP call to the 'sportal_init()' function.

Code: [Select]
//If the user isn't an admin, then hide the version'
if(!$user_info['is_admin'] && !empty($modSettings['hideVersion']) && $modSettings['hideVersion'])
$GLOBALS['forum_version'] = 'SMF';
Title: Re: Block Theming
Post by: swtdivalove on November 06, 2009, 08:26:37 PM
Will definitely give it a shot.
Title: Re: Block Theming
Post by: swtdivalove on November 06, 2009, 08:37:38 PM
That did it!  Thanks!
SimplePortal 2.3.8 © 2008-2024, SimplePortal