Osclass forums
Support forums => Themes => Repurpose => Topic started by: osclaza on April 22, 2017, 01:17:55 am
-
About my free classifieds osclass script, I need to make the following changes but do not know how;
1. to change the icon on the script from saying "Publish your ad for free" to saying "Publish your ad here now"?
2. to change the icon on the script from saying "Register for a free account" to saying "Register your account now"?
btw, I have purchased Payment Pro plugin which is working
-
About my free classifieds osclass script, I need to make the following changes but do not know how;
1. to change the icon on the script from saying "Publish your ad for free" to saying "Publish your ad here now"?
2. to change the icon on the script from saying "Register for a free account" to saying "Register your account now"?
btw, I have purchased Payment Pro plugin which is working
1.and 2. go to /oc-content/languages/en_EN ; EDIT: en_US not en_EN
Edit in cPanel theme.po and change that text.
save theme.po asuming you opened it with edit in cpanel.
Then install on your computer Poedit (in ubuntu, for windows search online .po file editor), download theme.po, open it with Poedit, ctrl-s . The program will make a theme.mo in the same folder that you saved theme.po.
Upload that theme.mo to /oc-content/languages/en_EN, overwriting the existing one.
Refresh (ctrl-f5) osclass main page.
This is for osclass 3.7.1
EDIT: This is for other than english language. See the below complete solution.
-
Your reply is received with thanks but I am having problems finding /oc-content/languages/en_EN
and cPanel theme.po, what are these and how do I find them , I don't see their links in my osclass classifieds' admin.
I'm not IT literate, btw.
Regards.
-
Your reply is received with thanks but I am having problems finding /oc-content/languages/en_EN
and cPanel theme.po, what are these and how do I find them , I don't see their links in my osclass classifieds' admin.
I'm not IT literate, btw.
Regards.
You can't find them in admin area.
How did you install osclass? Through ftp or cPanel?
-
EDIT: The shortest/best solution is not this.
Sorry. My solution was partial.
For english, you must also edit the english words as described here : https://forums.osclass.org/general-help/can-i-change-the-'publish-your-ad-for-free'-button-to-say-something-else/?topicseen
in footer.php, header.php, item-sidebar.php, user-login.php for Register text
in footer.php, header.php for Publish text
You must access your host through ftp or cPanel or other program.
oc-content/themes/bender/header.php
replace
<li><a href="<?php echo osc_register_account_url() ; ?>"><?php _e('Register for a free account', 'bender'); ?></a></li>
<?php }; ?>
<?php } ?>
<?php } ?>
<?php if( osc_users_enabled() || ( !osc_users_enabled() && !osc_reg_user_post() )) { ?>
<li class="publish"><a href="<?php echo osc_item_post_url_in_category() ; ?>"><?php _e("Publish your ad for free", 'bender');?></a></li>
with
<li><a href="<?php echo osc_register_account_url() ; ?>"><?php _e('Register your account now', 'bender'); ?></a></li>
<?php }; ?>
<?php } ?>
<?php } ?>
<?php if( osc_users_enabled() || ( !osc_users_enabled() && !osc_reg_user_post() )) { ?>
<li class="publish"><a href="<?php echo osc_item_post_url_in_category() ; ?>"><?php _e("Publish your ad here now", 'bender');?></a></li>
oc-content/themes/bender/footer.php
replace
<a href="<?php echo osc_register_account_url(); ?>"><?php _e('Register for a free account', 'bender'); ?></a>
</li>
<?php } ?>
<?php } ?>
<?php } ?>
<?php if( osc_users_enabled() || ( !osc_users_enabled() && !osc_reg_user_post() )) { ?>
<li class="publish">
<a href="<?php echo osc_item_post_url_in_category(); ?>"><?php _e("Publish your ad for free", 'bender');?></a>
with
<a href="<?php echo osc_register_account_url(); ?>"><?php _e('Register your account now', 'bender'); ?></a>
</li>
<?php } ?>
<?php } ?>
<?php } ?>
<?php if( osc_users_enabled() || ( !osc_users_enabled() && !osc_reg_user_post() )) { ?>
<li class="publish">
<a href="<?php echo osc_item_post_url_in_category(); ?>"><?php _e("Publish your ad here now", 'bender');?></a>
For item-sidebar.php and user-login.php you do it in a similar way. They all are in the same folder with footer and header files. you search and replace the Register text
NOTE: The text must be the same in all places!
Then in the theme.po file replace (with a text editor)
#: footer.php:43 header.php:55 item-sidebar.php:64 user-login.php:58
msgid "Register for a free account"
msgstr ""
#: footer.php:50 header.php:60
msgid "Publish your ad for free"
msgstr ""
with
#: footer.php:43 header.php:55 item-sidebar.php:64 user-login.php:58
msgid "Register your account now"
msgstr ""
#: footer.php:50 header.php:60
msgid "Publish your ad here now"
msgstr ""
Save it.
Then open theme.po with Poedit, hit save and upload theme.po and theme.mo to the language folder on your host, overwriting the ones from the server.
NOTE: if you install other languages you must edit the english text you replaced in theme.po in each language theme.po file, and generate theme.mo file as well.
EDIT: See below a shorter/better way of changing that text.
-
For other languages, editing only the .po and generating the .mo files(from that language folder!) would be enough.
-
Criei um topico.
-
Criei um topico.
Hi. Where did you create a topic?
-
/oc-content/languages/en_US
It just occured to me.
A shorter way would be to put in theme.po file from the en_US folder the replacement for the original english text.
Replace
#: footer.php:43 header.php:55 item-sidebar.php:64 user-login.php:58
msgid "Register for a free account"
msgstr ""
#: footer.php:50 header.php:60
msgid "Publish your ad for free"
msgstr ""
with
#: footer.php:43 header.php:55 item-sidebar.php:64 user-login.php:58
msgid "Register for a free account"
msgstr "Register your account now"
#: footer.php:50 header.php:60
msgid "Publish your ad for free"
msgstr "Publish your ad here now"
Then generate the .mo file and you're done.