Advertisement:

Author Topic: e function  (Read 40100 times)

Pigeon

  • Sr. Member
  • ****
  • Posts: 498
e function
« on: April 25, 2016, 01:53:09 pm »
Hi,

i wanna define_e() function's class in a page and use it, but  don't know where its class is,
where is it exactly?

Pigeon

  • Sr. Member
  • ****
  • Posts: 498
Re: e function
« Reply #1 on: May 03, 2016, 12:02:35 am »
 :(

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: e function
« Reply #2 on: May 03, 2016, 11:26:20 am »
This doesn't make any sense at all. What do you want to do exactly?

Pigeon

  • Sr. Member
  • ****
  • Posts: 498
Re: e function
« Reply #3 on: May 04, 2016, 10:54:14 am »
Hi,

i just created a new php page inside the modern theme, and put _e function to translate somthing, then it gave me an error to define that function

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: e function
« Reply #4 on: May 04, 2016, 10:59:41 am »
The _e() function is defined in the Osclass' core libraries, so you need to load them (just load oc-load.php) but you shouldn't be calling .php files directly, it's better if you call them through custom controller or page controller.

Pigeon

  • Sr. Member
  • ****
  • Posts: 498
Re: e function
« Reply #5 on: May 04, 2016, 11:43:44 am »
The _e() function is defined in the Osclass' core libraries, so you need to load them (just load oc-load.php) but you shouldn't be calling .php files directly, it's better if you call them through custom controller or page controller.

i tried and called (oc-load.php), but it did not worked and gave me error
and i dont know how to call through custom controller or page controller.

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: e function
« Reply #6 on: May 04, 2016, 11:48:02 am »
It works, if you don't share your code or how you are accessing the files, we can not help you any more

Pigeon

  • Sr. Member
  • ****
  • Posts: 498
Re: e function
« Reply #7 on: May 04, 2016, 11:51:24 am »
It works, if you don't share your code or how you are accessing the files, we can not help you any more

Thank you man, im not home right now, ill see the code and give you more details soon.

Pigeon

  • Sr. Member
  • ****
  • Posts: 498
Re: e function
« Reply #8 on: May 04, 2016, 12:36:11 pm »
Hey _CONEJO

in this address, i want to translate an error text
oc-includes\osclass\classes\database\DBConnectionClass.php

line: 270
Code: [Select]
                $message  = 'Osclass database server is not available. <a href="http://forums.osclass.org/">Need more help?</a></p>';

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: e function
« Reply #9 on: May 04, 2016, 12:45:48 pm »
1.- DBConnectionClass is loaded before the _e() function is defined
2.- That's no a "modern theme" file, as you stated before

In short, it's no easy to translate that string, it's possible, but maybe it's not worthy

Pigeon

  • Sr. Member
  • ****
  • Posts: 498
Re: e function
« Reply #10 on: May 04, 2016, 01:48:30 pm »
1.- DBConnectionClass is loaded before the _e() function is defined
2.- That's no a "modern theme" file, as you stated before

In short, it's no easy to translate that string, it's possible, but maybe it's not worthy

Okay _CONEJO, maybe later
Thank you.