Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes
Author Message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Thu Sep 02, 2004 12:29 am Reply with quote

Is anyone else having this problem? I'm not sure when it started here, but Downloads have the copyright link bottom right of the module as it should, but most, if not all, others do not. There is nothing wrong with the copyright.php files. I have isolated the apparent problem to the $name variable in footer.php is not correct in these cases. For example I have a module called Stock_Quote. footer.php is expecting it to read Stock_Quote, but instead the _ is missing, as in the custom title. So, the if() compare for the file_exists($name) is incorrect and never matches, thus the reason the link never appears. I'm continuing to look into it but I'd like to hear from the rest of you if you are experiencing this behaviour. That may help me isolate the cause. Thanks.


Last edited by Raven on Fri Sep 03, 2004 6:27 am; edited 2 times in total 
View user's profile Send private message
spcdata
Regular
Regular



Joined: Jan 24, 2004
Posts: 81
Location: Sweden

PostPosted: Thu Sep 02, 2004 6:32 am Reply with quote

Hi Raven!!

I don't know but when I click on a copyright link it doesn't matter which one it always shows the copyright for the NukeTreasury module, maybe the problem is that You have the copyright link in the donator block....??

_________________
/spcdata 
View user's profile Send private message Send e-mail Visit poster's website
Raven







PostPosted: Thu Sep 02, 2004 6:38 am Reply with quote

I had noticed that too, after I sent the message and was going to look into that today. Thans for confirming that you have an issue too! I will keep you posted.
 
sixonetonoffun
Spouse Contemplates Divorce



Joined: Jan 02, 2003
Posts: 2496

PostPosted: Thu Sep 02, 2004 6:42 am Reply with quote

Changing it to $module_name and adding it to the global line in footer.php seems to work ok.

Like ya said I'm sure it worked at one time. Not sure where/when it stopped though.

It was the same on my site I just never noticed it. Private_Messeges was about the only one I had though. Recommend Us but there isn't one in there.

_________________
[b][size=5]openSUSE 11.4-x86 | Linux 2.6.37.1-1.2desktop i686 | KDE: 4.6.41>=4.7 | XFCE 4.8 | AMD Athlon(tm) XP 3000+ | MSI K7N2 Delta-L | 3GB Black Diamond DDR
| GeForce 6200@433Mhz 512MB | Xorg 1.9.3 | NVIDIA 270.30[/size:2b8 
View user's profile Send private message
Raven







PostPosted: Thu Sep 02, 2004 6:46 am Reply with quote

Laughing When I try module_name everything says MS-Analysis as the link. Interesting because I just added MS-Analysis about a week ago. But, if you click on it, it still says Nuke Treasury!!!! Sounds like variable clashing ? Hmmmmm.
 
sixonetonoffun







PostPosted: Thu Sep 02, 2004 7:03 am Reply with quote

Hmn yer on to something there.
 
Raven







PostPosted: Thu Sep 02, 2004 7:08 am Reply with quote

A little progress! If you are using Nuke Treasury, you need to edit 2 files: Donations.html and Donatometer.html. Each of these files uses a javascript function the same as a nuke function. In these 2 files, rename all instances of "openwindow" to "openwindow1" (or whatever) and the links will display the correct copyright file. However, the links are still missing on the majority Evil or Very Mad This is just a quick fix to eliminate (hopefully) Nuke Treasury.
 
chatserv
Member Emeritus



Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico

PostPosted: Thu Sep 02, 2004 8:11 am Reply with quote

Looks to me as a variable clash too, as you may have seen in the past there are problems whenever a block uses variables like $url, $name etc... problem here is tracking which it is.
 
View user's profile Send private message Visit poster's website
spcdata







PostPosted: Thu Sep 02, 2004 8:20 am Reply with quote

Have you tried to remove the copyright link from the Donate o Meter block and move the block to the right side....?
 
Raven







PostPosted: Thu Sep 02, 2004 8:25 am Reply with quote

I have disabled NT completely and it doesn't matter. I have determined that $name is getting clobbered, somewhere. Clobbered in the sense of the _ is being replaced with ' ' and is not translating correctly. And it's not just a matter of using str_replace. For example, if you click on Stock Quotes in my modules list and then do a view source on the page, you will see a <form> tag with an action tag of 'modules?name=Stock Quote', instead of Stock_Quote. So, I am off to try to find who is clobbering $name.
 
Raven







PostPosted: Thu Sep 02, 2004 3:40 pm Reply with quote

Nuke Treasury and Dynamic Titles had formed a sort of dynamic duo that made this quite an elusive butterfly. Ah, but the Raven's net was broad enough to trap the rascal Wink

Nuke Treasury / Donations.html and Donameter.html:
Change all occurences of 'openwindow' to 'openwindow1'

includes/dynamic_titles.php:
This is the guy who was clobbering $name! It has a couple of places where it does $name=ereg_replace("_", " ", "$name"); which of course messes up the $name subsequently. So, I took the easy way out with this one.

Find
'// Item Delimeter'
and add this line right before it
$name=ereg_replace("_", " ", "$name");

Then just before the ?> tag, add the reverse code
$name=ereg_replace(" ", "_", "$name");

RavensScripts
 
sixonetonoffun







PostPosted: Wed Sep 29, 2004 6:45 am Reply with quote

I added this fix to the SEO Friendly Dynamic Titles files here Better late then never huh?
 
blith
Client



Joined: Jul 18, 2003
Posts: 977

PostPosted: Fri Oct 29, 2004 8:02 am Reply with quote

Raven I applied this fix to the donations files. And I am already using six's fixed dynamic titles but now whenever I click on the Treasury copyright it opens the copyright window of whatever module I am looking at. If I am in the forums it opens that one, if I am in Encyclopedia it opens that one.
 
View user's profile Send private message Visit poster's website
ciph3r
Worker
Worker



Joined: Jun 01, 2005
Posts: 178

PostPosted: Fri Jul 28, 2006 2:04 pm Reply with quote

blith wrote:
Raven I applied this fix to the donations files. And I am already using six's fixed dynamic titles but now whenever I click on the Treasury copyright it opens the copyright window of whatever module I am looking at. If I am in the forums it opens that one, if I am in Encyclopedia it opens that one.


I believe thats how it is supposed to work.

I still cant get the donations block out of my survey block, so i dunno what im doing wrong.

I have read, changed all the openwindow's in the .html files, and now my copyrights seem fine.......but the donations block is still merged into the survey block.
 
View user's profile Send private message Visit poster's website
Raven







PostPosted: Fri Jul 28, 2006 7:10 pm Reply with quote

I do not mean any offense by asking you this, but I must ask. Have you carefully edited the files as I have outlined here? I have had this work 100% of the time on the sites I have fixed.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes

View next topic
View previous topic
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©