Advertisement:

Author Topic: help with free classifieds osclass script ???  (Read 2487 times)

osclaza

  • Newbie
  • *
  • Posts: 4
help with free classifieds osclass script ???
« 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

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: help with free classifieds osclass script ???
« Reply #1 on: April 22, 2017, 04:57:33 pm »
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.
« Last Edit: April 28, 2017, 04:36:19 pm by marius-ciclistu »

osclaza

  • Newbie
  • *
  • Posts: 4
Re: help with free classifieds osclass script ???
« Reply #2 on: April 23, 2017, 05:07:59 pm »
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.

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: help with free classifieds osclass script ???
« Reply #3 on: April 23, 2017, 07:13:58 pm »
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?

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: help with free classifieds osclass script ???
« Reply #4 on: April 23, 2017, 10:27:04 pm »
EDIT: The shortest/best solution is not this.
Quote
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

Code: [Select]
<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

Code: [Select]
<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
Code: [Select]
<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

Code: [Select]
<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)

Code: [Select]
#: 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

Code: [Select]
#: 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.
« Last Edit: April 28, 2017, 04:22:07 pm by marius-ciclistu »

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: help with free classifieds osclass script ???
« Reply #5 on: April 23, 2017, 11:24:12 pm »
For other languages, editing only the .po and generating the .mo files(from that language folder!) would be enough.
« Last Edit: April 28, 2017, 04:40:28 pm by marius-ciclistu »

wolfartes

  • Newbie
  • *
  • Posts: 2
Re: help with free classifieds osclass script ???
« Reply #6 on: April 27, 2017, 01:37:25 am »
Criei um topico.
« Last Edit: April 27, 2017, 01:45:15 am by wolfartes »

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: help with free classifieds osclass script ???
« Reply #7 on: April 27, 2017, 10:47:02 pm »
Criei um topico.

Hi. Where did you create a topic?

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: help with free classifieds osclass script ???
« Reply #8 on: April 28, 2017, 02:55:32 pm »
 /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

Code: [Select]
#: 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


Code: [Select]
#: 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.


« Last Edit: April 28, 2017, 04:41:55 pm by marius-ciclistu »