Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
guidyy
Newbie
Newbie



Joined: Mar 20, 2006
Posts: 5

PostPosted: Fri Apr 21, 2006 5:28 am Reply with quote

Hi,
I have a strange behaviour with HNL and a modified header.php in RN76-2.02-02
For my dynamic meta tags, (not only title)
i did this change to header.php
Code:


// include("includes/meta.php"); // <-- original commented out
if (isset($module_name) && file_exists("modules/$module_name/meta.php")) {
                include("modules/$module_name/meta.php");   }
    else     {
        include("includes/meta.php");
        }


Then I need to add to the globals $module_name to have it working.
As soon as i do it i cant go to HNL administration and i get:
You can't access this file directly.
If i remove $module_name from Globals, everything is just fine
Any idea?
Guido
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Fri Apr 21, 2006 9:13 am Reply with quote

Ah, I think I remember seeing your thread on Raven's site about using a form of dynamic meta tags. Interesting stuff! Try this:

=== OPEN FILES ===

modules/HTML_Newsletter/index.php
modules/HTML_Newsletter/admin/index.php

=== AFTER LINE ===

$msnl_sModuleNm = "HTML_Newsletter";

=== ADD LINE ===

$module_name = "HTML_Newsletter";

+++ DONE +++

Let me know if that works. If so, I will make this a Sticky and modify the topic title slightly.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
guidyy
Newbie
Newbie



Joined: Mar 20, 2006
Posts: 5

PostPosted: Fri Apr 21, 2006 10:08 am Reply with quote

hi,
tried it but still "NO GO"

if I go to administration->Html Newsletter or I click on administer newsletter I get: You can't access this file directly...
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Fri Apr 21, 2006 10:32 am Reply with quote

Hhhmmm, that is strange. Try the same with the admin/case.php and possibly admin/links.php, but do these all one at a time, and see which one works. Then, if you get it to work, start removing them and let me know which one causes it to work.

Hopefully this is what it is...

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
guidyy
Newbie
Newbie



Joined: Mar 20, 2006
Posts: 5

PostPosted: Fri Apr 21, 2006 11:06 am Reply with quote

it's working now...
$module_name = "HTML_Newsletter"; goes in case.php
thx, Guido
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Fri Apr 21, 2006 12:05 pm Reply with quote

And is that the only place it is needed? Have you tried removing the changes everywhere else?

Sorry, just need to make certain.

Also, can you please try it with the block on the left AND then try it on the right too and make sure everything works properly.

Thanks!

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
guidyy
Newbie
Newbie



Joined: Mar 20, 2006
Posts: 5

PostPosted: Sun Apr 23, 2006 9:19 am Reply with quote

Cancel everything,
Must have been something on my local machine.
I uploaded the site to the hosting service and made a fresh install of HNL
and it just working fine with no modifications required.
maybe a glitch on my text editor... (no it's not notepad LOL!)
thx , Guido
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sun Apr 23, 2006 9:40 am Reply with quote

Hhmmm... I actually doubt that it was a typo in that you got it to work with adding that line. I am now thinking it may be somehow tied to register_globals being set differently between your local system and your production system. I would still want to fix that issue.

Can you please try again on your local test system to find out which edit made it work for you?

Many Thanks

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
guidyy
Newbie
Newbie



Joined: Mar 20, 2006
Posts: 5

PostPosted: Tue Apr 25, 2006 2:00 pm Reply with quote

Well,
I removed all instances of $module_name = "HTML_Newsletter";
form all files and tried to reproduce the error on my local machine.
NO ERROR....
It bugged me two days.. and now it's all gone...
The only other thing I did is rebooting XPCrapPro and reload a updated copy of the database
guido
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Wed Apr 26, 2006 7:36 am Reply with quote

Ok. Thank you for letting me know. These things happen sometimes.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunch