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
Codex little error in Creating a Theme procedure
Avatar
SPQC
Member
Free Members
sp_UserOfflineSmall Offline
Feb 3, 2012 - 11:09 am

Was giving a go at http://codex.simple-press.com/.....g-a-theme/ and found an error.  In step 3 you tell us to rename ‘default.php’ to the same name of our theme and it step 4 you say You can edit any other information in the spTheme.txt file you wish but the first line, naming your theme, is the only needed change.  What's missing is that the line stylesheet: default.php is also important, unless you skip step 3.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 3, 2012 - 8:04 pm

that is probably a good put and we can clarify that a bit...

Avatar
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
Feb 3, 2012 - 8:24 pm

SPQC said

Was giving a go at http://codex.simple-press.com/.....g-a-theme/ and found an error. 

Good catch. I added more info to that section and included the php file name change.

Thanks for the heads up.

Avatar
SPQC
Member
Free Members
sp_UserOfflineSmall Offline
Feb 3, 2012 - 8:49 pm

The screenshot show 1.0.10!  Must be coming with next update...  🙂  Where is the changelog?  wink

 

Also I want to report a little something now that I created my theme folder.  Whenever I switch back & forth between Default theme and mine, with the Activate button, there is a message that shows up at the top which is :

 

Fatal error: Cannot redeclare spdefault_textdomain() (previously declared in /wp/wp-content/sp-resources/forum-themes/SPQC/templates/spFunctions.php:17) in /wp/wp-content/sp-resources/forum-themes/default/templates/spFunctions.php on line 18


This don't seem to have any impact but I'm telling you, just in case you know what's going on.  Note that if I click Update Overlay, the message don't show up.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 3, 2012 - 8:53 pm

yes, since 1.0.9 of the themes was updated, any new version will be 1.0.10...  and we do have a few minor mods - mostly cleanup...

please note, that codex page walked you through changing the spFunctions.php file so you wont get that error... you need to make changes in there...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 3, 2012 - 8:53 pm

spDefault is the textdomain for our default theme... you need to make your own for your own theme...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 3, 2012 - 8:54 pm

right before 'try your new theme'... that step about editing spFunctions.php

Avatar
SPQC
Member
Free Members
sp_UserOfflineSmall Offline
Feb 3, 2012 - 9:06 pm

That did it...  the 1st time I actually did it, then realized that I lost the translations so I reverted back to original and forgot.  oops!

 

So I did it like stated, which gives :

 

add_action('init', 'spSPQC_textdomain');

# load the theme textdomain for tranlations
function spSPQC_textdomain() {
    sp_theme_localisation('spSPQC');
}

 

What's wrong?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 3, 2012 - 11:33 pm

so what's the problem? still getting the error?

Avatar
SPQC
Member
Free Members
sp_UserOfflineSmall Offline
Feb 4, 2012 - 7:53 am

If I use the code above, no, no errors but translation is broken.  That's why I reverted back and was having the rrror message but at least the translations were there.

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: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626