Author |
Message |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sat Mar 12, 2005 11:43 am |
|
Dear Ravenites ( ),
I am wondering why various addon makers are not using the global variable $Version_Num for helping to make unniversal versions of their tools (i.e., to support say PHP-Nuke 6.5 - 7.6) with regards to the changes to the admin structure with 7.5+.
Would not the following bit of code work?
Code:
if($Version_Num < 7.5) {
do whatever;
} else {
do the other;
}
|
Since I have only been Nukin' for about 5 months, I may have missed old threads / discussions from long back that might have caused all the "majors" to not use this method. I just do not like letting module admin links to show up in the system admin section when they should be in the module admin section, so I am trying to avoid that method of making tools "unniversal".
Any helpful advice would be greatly appreciated,
montego |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Tue Mar 15, 2005 9:03 pm |
|
There is no global variable $Version_Num that I am aware of. This is a column in the config table but it is not stored anywhere globally. Having clarified that , this could help in some instances, for sure. Then again, if FB would pick a plan and stick to it ..... I mean, by the time you reach a 7.5 version, don't you think the foundation/structure would have stabilized? Especially from 7.4? |
|
|
|
 |
CurtisH
Life Cycles Becoming CPU Cycles

Joined: Mar 15, 2004
Posts: 638
Location: West Branch, MI
|
Posted:
Tue Mar 15, 2005 9:07 pm |
|
Amen |
_________________ Those who dream by day are cognizant of many things which escape those who dream only by night. ~Poe |
|
|
 |
montego

|
Posted:
Tue Mar 15, 2005 10:48 pm |
|
Raven, its called out in mainfile.php (granted, not a global, per se):
Code:$Version_Num = $row['Version_Num'];
|
Would it be a viable option to use this variable since it is set in mainfile.php? Do you know if its set in mainfile.php will it be available in the links.php?
Just wanted to make sure I wasn't missing something obvious that others have already found to not work well with using this variable.
TIA,
montego |
|
|
|
 |
Raven

|
Posted:
Wed Mar 16, 2005 1:51 am |
|
It will be available to any script that includes mainfile.php |
|
|
|
 |
montego

|
Posted:
Wed Mar 16, 2005 6:51 am |
|
montego wrote: |
Just wanted to make sure I wasn't missing something obvious that others have already found to not work well with using this variable.
|
Does anyone have an opinion or experience with the above?
TIA,
montego |
|
|
|
 |
Raven

|
Posted:
Wed Mar 16, 2005 8:15 am |
|
What exactly are you after as far as an experience or an opinion? As I said in my original reply, it is a test that could be used and could be helpful. What else are you needing? |
|
|
|
 |
montego

|
Posted:
Wed Mar 16, 2005 2:34 pm |
|
Raven,
No problem here. It seemed like a too obvious solution for making "unniversal" versions and I didn't see Bob or yourself using it so I was thinking that maybe there was a very good reason why I would not want to use it.
You see, we hold you guys in such high regard that even the exclusion of something seems important!
Regards,
montego |
|
|
|
 |
|