| Author |
Message |
NanoCaiordo


Joined: Jun 29, 2004 Posts: 3678 Location: Melbourne, AU
|
Post subject: Re: DragonflyCMS 10 Posted: Thu Sep 25, 2008 1:39 pm |
|
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:
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 |
|
 |
Eestlane


Joined: Apr 06, 2005 Posts: 1406 Location: Estonia
|
Post subject: Re: DragonflyCMS 10 Posted: Thu Sep 25, 2008 1:45 pm |
|
NanoCaiordo wrote:
now remember that getlang will look into modules/yourmodule/l10n/ and after this will look into language/lang/
No 
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 |
|
 |
NanoCaiordo


Joined: Jun 29, 2004 Posts: 3678 Location: Melbourne, AU
|
Post subject: Re: DragonflyCMS 10 Posted: Thu Sep 25, 2008 2:21 pm |
|
You have now an idea how to make this happen ... let us know.
_________________ .:: 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 |
|
 |
Eestlane


Joined: Apr 06, 2005 Posts: 1406 Location: Estonia
|
Post subject: Re: DragonflyCMS 10 Posted: Thu Sep 25, 2008 2:23 pm |
|
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 |
|
 |
NanoCaiordo


Joined: Jun 29, 2004 Posts: 3678 Location: Melbourne, AU
|
Post subject: Re: DragonflyCMS 10 Posted: Thu Sep 25, 2008 2:31 pm |
|
"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 |
|
 |
Eestlane


Joined: Apr 06, 2005 Posts: 1406 Location: Estonia
|
Post subject: Re: DragonflyCMS 10 Posted: Thu Sep 25, 2008 2:32 pm |
|
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 |
|
 |
earth


Joined: Mar 01, 2006 Posts: 268
|
Post subject: Re: DragonflyCMS 10 Posted: Thu Oct 09, 2008 9:11 pm |
|
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 |
|
 |
NanoCaiordo


Joined: Jun 29, 2004 Posts: 3678 Location: Melbourne, AU
|
Post subject: Re: DragonflyCMS 10 Posted: Fri Oct 10, 2008 9:03 am |
|
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 |
|
 |
WebSiteGuru


Joined: Jun 09, 2005 Posts: 2321
|
Post subject: Re: DragonflyCMS 10 Posted: Fri Oct 10, 2008 2:32 pm |
|
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 |
|
 |
earth


Joined: Mar 01, 2006 Posts: 268
|
Post subject: Re: DragonflyCMS 10 Posted: Sat Oct 11, 2008 3:32 pm |
|
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 |
|
 |
NanoCaiordo


Joined: Jun 29, 2004 Posts: 3678 Location: Melbourne, AU
|
Post subject: Re: DragonflyCMS 10 Posted: Sun Oct 12, 2008 11:02 am |
|
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 |
|
 |
Aforo


Joined: Dec 27, 2007 Posts: 146
|
Post subject: Re: DragonflyCMS 10 Posted: Sun Oct 12, 2008 8:38 pm |
|
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 |
|
 |
Dizfunkshunal


Joined: Mar 23, 2006 Posts: 2079
|
Post subject: Re: DragonflyCMS 10 Posted: Sun Oct 12, 2008 9:47 pm |
|
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 |
|
 |
Aforo


Joined: Dec 27, 2007 Posts: 146
|
Post subject: Re: DragonflyCMS 10 Posted: Sun Oct 12, 2008 11:37 pm |
|
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 |
|
 |
Phoenix


Joined: Apr 19, 2004 Posts: 8729 Location: Netizen
|
Post subject: Re: DragonflyCMS 10 Posted: Mon Oct 13, 2008 12:10 am |
|
v10 is far away - no target date - don't even think about it.
v9.? update should be soon - hint Nano nudge nudge
Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
 |
|
| Back to top |
|
 |