Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Adding more options in default.php theme
Avatar
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
Oct 25, 2011 - 9:59 pm

Is there any plans to add more options into the default.php theme file to pull more info from the overlay file?

For example I wanted to change the font size of the post topic. In order to do so I had 2 choices. One was to edit the font size in the default.php file or I could add a new call to the overlay file and enter the info there.

What I decided to do was create a $PostContentFontSize entry in my overlay file and then edit the default.php file like this.

 

#spMainContainer .spTopicPostSection .spPostSection .spPostContentSection .spPostContent {
    border-top: <?php echo($postBorder); ?>;
    color: <?php echo($postColor); ?>;
    margin: 5px 0;
    padding: 10px;
/*    font-size: 90%; */
font-size: <?php echo($PostContentFontSize); ?>;
    line-height: 1.2em;

 

I understand you guys are working on all kinds of things but if you think it would be a good idea to add more of these type of options to the theme and overlay files I could probably help a bit.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Oct 26, 2011 - 10:05 am

Personally I would welcome the additions and you are right - just don't have the time to sit down and make them.

We would warmly welcome the help but I would ask that if you do want to go ahead and add these in then it would need to be in all current themes and all overlays to be consistent... sorry if that puts you off !

But - if you decide to tackle it then please do grab the latest from svn themes - and obviously best for us would be patch files...

Thanks

andy-signature.png
YELLOW
SWORDFISH
Avatar
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
Oct 26, 2011 - 8:42 pm

Let me look and see if there is an easy way to edit one default.php file and one overlay and then merge the changes with the others.

Since it wouldn't affect any color or image links it shouldn't be that hard.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 26, 2011 - 11:59 pm

a simple copy and paste from one overlay to the other would work - unless colors (text, border, background, etc) are involved...  probably easier than trying to merge... but however it works for you! wink

are you comfortable with creating patches? usually can do right from your svn client... can provide more help if you need it...

Avatar
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
Oct 28, 2011 - 8:38 pm

I got a chance to mess with this some. I changed about 60 lines that had an actual text size in the default.php file. I changed them to get the info from the overlay file instead.

In the overlay files I added them all to the bottom of the file under Misc Font Sizes.

I created a patch file to see if it will work for you.

The patch file is of the templates/default/styles folder. It contains the changes I made to the default.php file and all the overlay files.

I also noticed a couple of errors in the red-sky overlay so it includes those fixes also.

I tested the default and red-sky overlay on my site.

Let me know if this works and if it is what you were thinking. Will email to you, it doesn't look like I can attach Zip, txt or patch files here.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 29, 2011 - 8:53 am

yeah, we dont let users upload files here... we might want to change that for patches...

in meantime, you can email the .patch file to support at simple-press dot com

thanks...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 29, 2011 - 1:46 pm

Brandon, taking a look at these changes - quite extensive! wink

however, you missed updating one file...  in the styles directory, there is a file called spOverlays.txt...  you need to update that to include what you added...  that file is useful to know where each overlay option is used...

there is a syntax error in the overlays - missing ; end of line 332/333 area (checked multiple but not all)

Can you update that file, fix the errors and regenerate the patch file?

Avatar
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
Oct 29, 2011 - 7:28 pm

No problem, will do.

I also caught another error like the one you mentioned. Will fix it all up and email you the patch.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 29, 2011 - 8:40 pm

sounds good. Do you plan to give the other themes a similar treatment?

we still need to review the finals to make sure working, but noticed those things today... thanks for helping out!

Avatar
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
Oct 29, 2011 - 9:25 pm

I was thinking that it would be cool to take some of the images from the /default/images folder and move them to the default/styles/images folder.

Then create the options in the default.php file to have it get the image name from the overlay file.

The thinking is that someone could change the images like on/off up,right,down arrows etc in the overlay file. Instead of the Default.php file. That way they could use their own made images but any update you did to the default.php file would not affect their custom images. They would never have to worry about your changes affecting their look and can update automatically in the future instead of having to re-edit the default.php file.

Thoughts?

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625