DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • September 02, 2010, 09:45:31 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: "Incompatible with" key for modules  (Read 1621 times)
0 Members and 1 Guest are viewing this topic.
Catscradler
Codemeister
****
Offline Offline

Posts: 298


View Profile WWW
« on: December 12, 2005, 04:31:47 PM »

My proposal for future development of the core: an "incompatible with" key in the info array of modules.

It would do this:
1. When installing a module, the 'incompatible' key in the info array is checked.
That key contains a comma separated list of modules that will either cause this one not to work, or other modules that this one would break were it installed and activated.

2. If any of those modules are found to be installed, this module is not installed, and outputs an error message such as "This module is incompatible with (xxxxxxx.php OR module name). Please see search for information at http://dragonprime.net in order to resolve this issue."
Logged

Co-author of the in-game FAQ. Administrator on Classic Server.
kickme
Global Moderator
Mod God
*****
Offline Offline

Posts: 1534


Yay for elephants!


View Profile WWW
« Reply #1 on: December 12, 2005, 09:25:49 PM »

You could do this manually, by having
Code:
if(is_module_installed("modulename")) {
output("This module is incompatible with (xxxxxxx.php OR module name). Please see search for information at ");
rawoutput("<a href="http://dragonprime.net">http://dragonprime.net</a>");
output(" in order to resolve this issue.");
addnav("","http://dragonprime.net");
return false;
}
Logged

Waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka<br /><br />A mini city
Nightborn
Guest
« Reply #2 on: December 12, 2005, 10:50:39 PM »

Just one question:

for what do you need that?

0.97 and 1.0.x/0.98 are not compatible... that's it.

There is no use making a 1.0.x module that's incompatible to another one. Yet *I* haven't encountered any yet, so you might share your knowledge with me what didn't work for you Smiley

To mark a module 0.97 or 1.0.x is something usually done when it comes to downloading.
Logged
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5223



View Profile WWW
« Reply #3 on: December 12, 2005, 11:00:16 PM »

He's referring to 1.x.x modules which cause other modules to cause problems...hence, they are incompatible.
Logged

Play the latest beta version here on DragonPrime
Nightborn
Guest
« Reply #4 on: December 13, 2005, 03:30:31 AM »

Hm, I see. Yet I can't think of any examples...  Embarrassed

Except poorly programmed ones with lots of bugs (yet they are incompatible to lotgd core if you ask me...)
Logged
Catscradler
Codemeister
****
Offline Offline

Posts: 298


View Profile WWW
« Reply #5 on: December 13, 2005, 04:34:45 PM »

Just an idea I came up with while discussing this.

If cities2 was created and installed alongside cities, you might have duplicate navs added, hooks being called twice and possibly interfering with each other, and other unpredictable behaviour.

Pure theory at this point, and no concrete examples, but it seemed like a good idea when I thought of it. (And to me it still is!)
Logged

Co-author of the in-game FAQ. Administrator on Classic Server.
Torne
SVN Users
Codemeister
*
Offline Offline

Posts: 259


Code ninja


View Profile
« Reply #6 on: December 13, 2005, 05:21:42 PM »

It seems sensible. If I have some spare minutes I might do it Wink

Might not get used a lot but hey.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Who's Online
31 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search