DragonflyCMS 10
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexCVS Info
Author Message
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3678
Location: Melbourne, AU

PostPost subject: Re: DragonflyCMS 10
Posted: Thu Sep 25, 2008 1:39 pm
Reply with quote

NanoCaiordo wrote:
CVS already includes a new HOOK class, it's a simple and easy way to permit so called mods, plug-ins or hacks to be included in the core execution at different stages (which and where is to be discussed).


Code:
INSERT INTO cms_hooks (cfile, hfile, hfunc) VALUES (header.php, yourfile.php, yourfunc)


So you are looking for a custom site-wide lang ... we may place an hook in header.php.

header.php:
Code:
HOOK::execute(__FILE__)

yourfile.php:
PHP:
yourfunc() {
return
getlang(mylang)
}

now remember that getlang will look into modules/yourmodule/l10n/ and after this will look into language/lang/

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
Eestlane
I18N / L10N Lead Dev


Joined: Apr 06, 2005
Posts: 1406
Location: Estonia

PostPost subject: Re: DragonflyCMS 10
Posted: Thu Sep 25, 2008 1:45 pm
Reply with quote

NanoCaiordo wrote:

now remember that getlang will look into modules/yourmodule/l10n/ and after this will look into language/lang/
No Smile

Code:
function get_lang($module, $filename=false, $linenum=false, $once=true) {
  static $loaded;
  $file = strtolower($module);
  if (isset($loaded[$file])) { return true; }
  global $currentlang, $MAIN_CFG, $LNG;
  $language = $MAIN_CFG['global']['language'];
  if (file_exists(BASEDIR."language/$currentlang/$file.php")) {
    $path = BASEDIR."language/$currentlang/$file.php";
  } else if (file_exists(BASEDIR."modules/$file/l10n/id.php")) {
    $id = include(BASEDIR."modules/$file/l10n/id.php");
    if (isset($loaded[$id])) {
      $loaded[$file] = 1;
      return true;
    }
    if (file_exists(BASEDIR."modules/$file/l10n/$currentlang.php")) {
      $path = BASEDIR."modules/$file/l10n/$currentlang.php";
    } else if (file_exists(BASEDIR."modules/$file/l10n/$language.php")) {
      $path = BASEDIR."modules/$file/l10n/$language.php";
    } else if (file_exists(BASEDIR."modules/$file/l10n/english.php")) {
      $path = BASEDIR."modules/$file/l10n/english.php";
    }
  } else if (file_exists(BASEDIR."language/$language/$file.php")) {
    $path = BASEDIR."language/$language/$file.php";
  } else if (file_exists(BASEDIR."language/english/$file.php")) {
    $path = BASEDIR."language/english/$file.php";
  } else {
    if ($filename != -1) {
      $err = ($module=='') ? 'get_lang called without specifying which module' : 'There is no language file for module '.$module;
      if ($filename) {
      global $cpgdebugger;
      $cpgdebugger->handler(E_USER_NOTICE, $err, $filename, $linenum);
      } else {
      trigger_error($err, E_USER_NOTICE);
      }
    }
    return false;
  }
  $loaded[$file] = 1;
  ($once) ? require_once($path) : require($path);
  return true;
}




Shouldn't cmsinit.inc or index.php be better than header.php btw? As sometimes I might not even want to have header included but still use the languagestrings. Or maybe not...


Eestlane's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.0.63/5.0.67/5.2.8/9.2.1
Back to top
View user's profile Send e-mail Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3678
Location: Melbourne, AU

PostPost subject: Re: DragonflyCMS 10
Posted: Thu Sep 25, 2008 2:21 pm
Reply with quote

You have now an idea how to make this happen ... let us know. Coffee
_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
Eestlane
I18N / L10N Lead Dev


Joined: Apr 06, 2005
Posts: 1406
Location: Estonia

PostPost subject: Re: DragonflyCMS 10
Posted: Thu Sep 25, 2008 2:23 pm
Reply with quote

Yes thanks.

However, it requires me to edit one of the core files to enable them to have hooks? But that's only until 10 final is out, right?


Eestlane's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.0.63/5.0.67/5.2.8/9.2.1
Back to top
View user's profile Send e-mail Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3678
Location: Melbourne, AU

PostPost subject: Re: DragonflyCMS 10
Posted: Thu Sep 25, 2008 2:31 pm
Reply with quote

"which and where is to be discussed"
_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
Eestlane
I18N / L10N Lead Dev


Joined: Apr 06, 2005
Posts: 1406
Location: Estonia

PostPost subject: Re: DragonflyCMS 10
Posted: Thu Sep 25, 2008 2:32 pm
Reply with quote

Yep, got it then. Thanks again.

Eestlane's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.0.63/5.0.67/5.2.8/9.2.1
Back to top
View user's profile Send e-mail Visit poster's website
earth
Heavy poster


Joined: Mar 01, 2006
Posts: 268

PostPost subject: Re: DragonflyCMS 10
Posted: Thu Oct 09, 2008 9:11 pm
Reply with quote

would it be possible to join the beta testers, as not sure how much help it would be, however I would be interested in doing do!

earth's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
OS/Apache/Mysql/php/9.2.X/
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3678
Location: Melbourne, AU

PostPost subject: Re: DragonflyCMS 10
Posted: Fri Oct 10, 2008 9:03 am
Reply with quote

There is not a dedicated beta testing group, everyone can modify the code, test it, let us know about your changes including the reason for them and others will then try your changes.

This is valid for everyone not only you.

@Eestlane: modify index.php, test it and let us know.
Others will then try your changes and maybe requirements are different, so we will discuss the changes.

I'm betting on my very first quick shortcut see how it goes.

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
WebSiteGuru
1000+ Posts Club


Joined: Jun 09, 2005
Posts: 2321

PostPost subject: Re: DragonflyCMS 10
Posted: Fri Oct 10, 2008 2:32 pm
Reply with quote

WebSiteGuru wrote:
I just tried to install the CVS to take a look at it, and I am getting this error:

Quote:
Fatal error: Call to undefined function: stripos() in /home/***/includes/cmsinit.inc on line 30
WebSiteGuru wrote:
Nevermind, just found out that my server php version is 4 and DF 10 required php5.

OK! I think I might still have a problem. I check my PHP and it did said PHP 5.x. So, how can I fix this problem? Thanks!

_________________
Lead Theme Designer - WebSiteGuru Designs

WebSiteGuru's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.9 / Apache 2.2.6 / MySQL 5.0.27 / PHP 5 / DF Version 9.2.1
Back to top
View user's profile Visit poster's website Yahoo Messenger
earth
Heavy poster


Joined: Mar 01, 2006
Posts: 268

PostPost subject: Re: DragonflyCMS 10
Posted: Sat Oct 11, 2008 3:32 pm
Reply with quote

NanoCaiordo wrote:
There is not a dedicated beta testing group, everyone can modify the code, test it, let us know about your changes including the reason for them and others will then try your changes.

This is valid for everyone not only you.

right on, thanks!


earth's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
OS/Apache/Mysql/php/9.2.X/
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3678
Location: Melbourne, AU

PostPost subject: Re: DragonflyCMS 10
Posted: Sun Oct 12, 2008 11:02 am
Reply with quote

WebSiteGuru wrote:
OK! I think I might still have a problem. I check my PHP and it did said PHP 5.x. So, how can I fix this problem? Thanks!

Don't know, contact your server administrator.

php.net/stripos

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
Aforo
I18N / L10N Lead Dev


Joined: Dec 27, 2007
Posts: 146

PostPost subject: Re: DragonflyCMS 10
Posted: Sun Oct 12, 2008 8:38 pm
Reply with quote

When we could get the DF 10 version?
Coud be launch it at the end of October?


Aforo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Centos 5/Apache 2.2.3/MySQL:5.0.45/PHP:5.2.10 /9.2
Back to top
View user's profile Visit poster's website
Dizfunkshunal
Platinum Supporter


Joined: Mar 23, 2006
Posts: 2079

PostPost subject: Re: DragonflyCMS 10
Posted: Sun Oct 12, 2008 9:47 pm
Reply with quote

no time has been set for DF 10 release if you would like to see the new features that have been currently added you can install cvs version which is the development version.

Using cvs version is NOT recommended.
If you do choose to use cvs version you should be good at php/mysql, debugging, etc.

For testing install cvs version on sub domain. I would NOT run cvs version on your production sites.

_________________
Diz Web Design Status: Open (Use of resources requires registration.)

Dizfunkshunal's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Multiple Setups
Back to top
View user's profile Send e-mail Visit poster's website Yahoo Messenger
Aforo
I18N / L10N Lead Dev


Joined: Dec 27, 2007
Posts: 146

PostPost subject: Re: DragonflyCMS 10
Posted: Sun Oct 12, 2008 11:37 pm
Reply with quote

Thanks, Dizfunkshunal

I'm preparing two new sites, and I'm thinking waiting for the DF 10 version or preparing it under the actual version. Changes are many and work can be too much for loosing it.

_________________
Aforo - Google Earth - WebNaranja - DFcms.es

Aforo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Centos 5/Apache 2.2.3/MySQL:5.0.45/PHP:5.2.10 /9.2
Back to top
View user's profile Visit poster's website
Phoenix
Site Admin


Joined: Apr 19, 2004
Posts: 8729
Location: Netizen

PostPost subject: Re: DragonflyCMS 10
Posted: Mon Oct 13, 2008 12:10 am
Reply with quote

v10 is far away - no target date - don't even think about it.

v9.? update should be soon - hint Nano nudge nudge Wink


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexCVS Info All times are GMT
Go to page Previous  1, 2, 3, 4, 5  Next
Page 2 of 5


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Dedicated Server & Bandwidth Sponsored by DedicatedNOW
User Info [x]

Welcome Anonymous

Nickname
Password
(Register)

Last CVS commits [x]

Languages [x]

Community [x]

Support for DragonflyCMS in a other languages:

Deutsch
Español

X-links [x]
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

Preview theme [x]
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.


You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
This page generated in 0.9777 seconds with 16 DB Queries in 0.269 seconds
Memory Usage: 3.03 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy