81
Dylian
Re: Possible new way of loading language files
  • 2009/8/18 9:40

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Ok, it was just a idea . But i still think we need a way to ensure that all lnaguage variables are defined. I don't think users of a website will like to see a string like _MD_MODULE_VARIABLE. Maybe if we can do it like this.

Add this as a core function:
function define_lang($name$value$case_insensitive false) {
   if (
defined($name)) {
      
define($name$value$case_insensitive);
   }
}


Use this in the page where you want to use the language defines:
if ( file_exists"language/" $xoopsConfig['language'] . "/main.php" ) ) { 
    include 
"language/" $xoopsConfig['language'] . "/main.php"
}
if ( 
file_exists"language/english/main.php" ) ) { 
    include 
"language/english/main.php"
}


The local language files use define($name, $value, $case_insensitive); and in the english files use the define_lang($name, $value, $case_insensitive);.

Is this a better idea?

Greets Dylian.




82
Dylian
Possible new way of loading language files
  • 2009/8/18 1:30

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


When i was working on my website today i came across a few undefined language variables. Then i started thinking how i could ensure that a lanuage variable is always defined. Thats when i got a very simple solution, i first thought it wasn't going to work but it did (At least on my system).

So this is wat i've done. I replaced the normal if rule:
if ( file_exists"language/" $xoopsConfig['language'] . "/main.php" ) ) {
    include 
"language/" $xoopsConfig['language'] . "/main.php";
}elseif ( 
file_exists"language/english/main.php" ) ) {
    include 
"language/english/main.php";
}


with:
if ( file_exists"language/english/main.php" ) ) {
    include 
"language/english/main.php";
}
if ( 
file_exists"language/" $xoopsConfig['language'] . "/main.php" ) ) {
    include 
"language/" $xoopsConfig['language'] . "/main.php";
}


This way if a variable isn't defined in a local file, you will get the english text.

Maybe it's crazy, maybe it's not but for me this works.

Maybe if it works on every system, module and core developers could load language file's this way in the future.

Please respond, Dylian.

P.S. Sorry for my bad english.



83
Dylian
Re: Professionalising the URL addresses
  • 2009/8/8 9:50

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Hello everybody, i've been working with TOON2009 and i think we have it all working now. I'll try to explain how we did it... (Mostly how it works with his hosting setup ).

His hosting setup is like this:
for domain.org you have to place the file's in the main main directory (let's say the public_html directory)
In this director there's a director for the .com and the .net so its like this:

/public_html/ (domain.org)
/public_html/com (domain.com)
/public_html/net (domain.net)

And i think the problem we had was that the hosting has some sort of rule that a .htaccess file can only be placed in the root folder of a domain so for .org this was the public_html dir and for .com its the .com dir and not the public_html directory.

We placed the .htaccess in the right place and everyting seems to be working now.

Greets Dylian
Dylian.eu | Webdevelopment
|http://dylian.eu |

Dylian Melgert | Home
|http://me.dylian.eu |

Arcus College Shedule Notification Service
|http://arcus.dylian.eu |



84
Dylian
Re: Can Xoops do this?
  • 2009/8/7 12:42

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Maybe Wf-Books (by shine) is something for you.

Greets Dylian
Dylian.eu | Webdevelopment
|http://dylian.eu |

Dylian Melgert | Home
|http://me.dylian.eu |

Arcus College Shedule Notification Service
|http://arcus.dylian.eu |



85
Dylian
Re: Enable HTML for Private Messages
  • 2009/8/7 3:25

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


If you use the pm module (the one in the core package) open root/modules/pm/class/message.php and look for
$this->initVar('to_save'XOBJ_DTYPE_INT0false);


after this line add:
$this->initVar("dohtml"XOBJ_DTYPE_INT1true);


Greets Dylian.
Dylian.eu | Webdevelopment
|http://dylian.eu |

Dylian Melgert | Home
|http://me.dylian.eu |

Arcus College Shedule Notification Service
|http://arcus.dylian.eu |



86
Dylian
Re: SyntaxHighlighting in editor
  • 2009/8/6 12:44

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Yes i mean syntax highlighting in the editor, it's easier to edit a piece of code in a message when it's syntax is highlighted.

[edit]
Maybe something like this:http://helene.muze.nl/
[/edit]

I know that it's a silly idea but it could come in very handy.

Greets Dylian.
Dylian.eu | Webdevelopment
|http://dylian.eu |

Dylian Melgert | Home
|http://me.dylian.eu |

Arcus College Shedule Notification Service
|http://arcus.dylian.eu |



87
Dylian
Re: Urgent attention All Xoops Modules and theme developers
  • 2009/8/6 11:51

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Maybe someone can develop a good social network module and ad a function to colaborate with other social networks like facebook and hyves. And not only to GET info but also to POST info like pictures, video's, music (not on facebook but hyves has this option) etc...

This could also save a lot of server space .

Greets Dylian
Dylian.eu | Webdevelopment
|http://dylian.eu |

Dylian Melgert | Home
|http://me.dylian.eu |

Arcus College Shedule Notification Service
|http://arcus.dylian.eu |



88
Dylian
SyntaxHighlighting in editor
  • 2009/8/6 11:24

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


I don't know if it's even posible (it should be with javascript i think?)but i think it would be nice if we could have some sort of SyntaxHighlighting in the XOOPS editor.

And maybe the normal highlighting could be replaced with this onehttp://alexgorbatchev.com/wiki/SyntaxHighlighter?

Instead of:
<?php
if (!defined('MEDIAWIKI'))
    exit(
1);

$wgExtensionFunctions[] = "wfSyntaxHighlighterExtension";

$wgExtensionCredits['other'][] = array(
    
'name' => 'SyntaxHighlighter',
    
'author' => array('Alex Gorbatchev'),
    
'version' => '1.0',
    
'url' => 'http://alexgorbatchev.com/projects/syntaxhighlighter',
    
'description' => 'Provides tight integration with SyntaxHighlighter.'
);

// Path to the SyntaxHighlighter scripts
$wgSyntaxHighlighterScriptPath "{$wgScriptPath}/extensions/SyntaxHighlighter/scripts";

// Path to the SyntaxHighlighter styles
$wgSyntaxHighlighterStylesPath "{$wgScriptPath}/extensions/SyntaxHighlighter/styles";


It would then look like:
Resized Image

Greets Dylian
Dylian.eu | Webdevelopment
|http://dylian.eu |

Dylian Melgert | Home
|http://me.dylian.eu |

Arcus College Shedule Notification Service
|http://arcus.dylian.eu |



89
Dylian
Re: Help with top entries block
  • 2009/8/3 18:08

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Did it work??
Dylian.eu | Webdevelopment
|http://dylian.eu |

Dylian Melgert | Home
|http://me.dylian.eu |

Arcus College Shedule Notification Service
|http://arcus.dylian.eu |



90
Dylian
Re: Want to open my xoops to all, but with admin login
  • 2009/7/16 14:02

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Quote:
Or is there a nother way to for example add the login url to admin in a special button?


Yes there is just place a link/button tohttp://your.website.url/user.php

Greets Dylian.
Dylian.eu | Webdevelopment
|http://dylian.eu |

Dylian Melgert | Home
|http://me.dylian.eu |

Arcus College Shedule Notification Service
|http://arcus.dylian.eu |




TopTop
« 1 ... 6 7 8 (9) 10 11 »



Login

Who's Online

143 user(s) are online (99 user(s) are browsing Support Forums)


Members: 0


Guests: 143


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits