Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN Themes Issues
Author Message
spyrule
Worker
Worker



Joined: Jun 06, 2006
Posts: 105

PostPosted: Tue Aug 28, 2007 10:56 am Reply with quote

Hello,

I'm not sure if this falls under Themes or not, but ...

All the menu option when I'm logged in as Administrator, are broken :

· Administration, = [ Only registered users can see links on this board! Get registered or login! ]"admin.php/"

· NEW Story = [ Only registered users can see links on this board! Get registered or login! ]"admin.php?op=adminStory\"

· Change Survey = [ Only registered users can see links on this board! Get registered or login! ]"admin.php?op=create\"

· Content = [ Only registered users can see links on this board! Get registered or login! ]"admin.php?op=content\"

· Logout = [ Only registered users can see links on this board! Get registered or login! ]"admin.php?op=logout\"

This only seems to be happening on the Administrator menu, and nothing else.

The problem is the /"admin.php?op=XXX\" it's the first quote, and the trailing \" that is the issue.

The odd part, is that besides adding a module and 2 tables, I have not modified the files in anyway, so I don't know how this got changed.

Anybody out there have a suggestion on where to look for this change?
 
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Tue Aug 28, 2007 11:09 am Reply with quote

Go into your admin panel, blocks, and edit the Administration block.

_________________
GCalendar - An Event Calendar for PHP-Nuke
Member_Map - A Google Maps Nuke Module 
View user's profile Send private message
spyrule







PostPosted: Tue Aug 28, 2007 11:43 am Reply with quote

I've edited them, and the quotes are still getting added back into the link.

How is this happening?!?
 
Gremmie







PostPosted: Tue Aug 28, 2007 5:42 pm Reply with quote

I dunno, works for me. Are you using the WYSIWYG editor? Do you have short links or rewrite rules on?
 
spyrule







PostPosted: Tue Aug 28, 2007 7:23 pm Reply with quote

Yeah, that's the odd part. I have a duplicated website with the exact same Db, and I re-installed the raven files (except my config.php file), and the problem doesn't exist there.

So obviously the file that creates/modifies the changes is the problem.

Where do I control Short links/rewrites from?
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Tue Aug 28, 2007 7:39 pm Reply with quote

ShortLinks will not touch anything with admin.php in it, only modules.php, so that is not it.

Make sure the following function in mainfile.php is correct:

function adminblock()

Also, try commenting out this line:

Code:


            $content = preg_replace('/\badmin.php/', $admin_file.'.php', $content); //RN6444


If that does nothing, put it back. Not sure what is wrong.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
Gremmie







PostPosted: Tue Aug 28, 2007 9:00 pm Reply with quote

Hey that's my fix! Smile
 
spyrule







PostPosted: Tue Aug 28, 2007 9:31 pm Reply with quote

Thanks guys, I'll test this in the morning when I can get to the server (it's an intranet server, so no external access from home!).

-spyrule
 
montego







PostPosted: Wed Aug 29, 2007 6:30 am Reply with quote

spyrule, also try editing the links directly through phpMyAdmin. If you see them correctly within the database, then its code related. At least we would be closer to figuring this out.
 
spyrule







PostPosted: Wed Aug 29, 2007 9:46 am Reply with quote

Yeah,

That above code doesn't seem to have made any difference.

Where in the database are those strings stored?
 
montego







PostPosted: Wed Aug 29, 2007 8:12 pm Reply with quote

It is in table nuke_blocks and look for a bkey of admin
 
spyrule







PostPosted: Thu Aug 30, 2007 7:48 am Reply with quote

Thanks montego,

I looked in the Db, and they are fine. So I'm not sure where this link error is occuring.
Which actual file generates the display on the page?

I might just replace it with an original to see what happens.

spyrule
 
montego







PostPosted: Thu Aug 30, 2007 8:03 am Reply with quote

mainfile.php in that function that I mentioned above.
 
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Thu Aug 30, 2007 8:30 am Reply with quote

Quote:
<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php">Administration</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php?op=adminStory">NEW Story</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php?op=create">Change Survey</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php?op=content">Content</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php?op=purchase">Purchase</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php?op=logout">Logout</a>


I just went into Phpmyadmin on my local test system, brought up the nuke_blocks table, went in to edit the bkey = admin record and copied and pasted the contents above. Don't copy exactly what I posted since I have some modules there you won't but that's the format you should see.

It is very unlikely that mainfile is doing anything to foul this up for you unless you've hacked it.
 
View user's profile Send private message Visit poster's website
spyrule







PostPosted: Tue Sep 04, 2007 7:23 am Reply with quote

Ok, I am totally stumped.

I have replaced the mainfile.php (it's possible that I edited something at some point).
Replaced the content of the Db completely, as mentioned by fkelly (skipping the Purchase line only).

and I still get the same broken links. I'm quite stumped.

I don't want to replace all the files, since I have had to modify some files, however I have not kept a history of files modified, so I cannot remember what I all did (my stupidity in this instance is obvious).

The main things that I have done, is edited the english/french language files to add a few _translation words to /modules/Your_Account/index.php file. specifically changing the :
Quote:
.'<center><font class="content">[ <a href="modules.php?name='.$module_name.'&amp;op=pass_lost">'._PASSWORDLOST.'</a> | <a href="modules.php?name='.$module_name.'&amp;op=new_user">'._REGNEWUSER.'</a> ]</font></center>'."\n";


and commented it out, and replaced with :

Quote:

.'<center><font class="content">'._ACTIVATESEEMANAGER.'</font></center>'."\n";


This is the only major change that I have done.

Any idea's from anybody, would be greatly apreciated.

Spyrule.
 
fkelly







PostPosted: Tue Sep 04, 2007 9:18 am Reply with quote

Could you go into administration, then blocks. You should have a block called administration. Go to edit it. In the content area of the wysiwyg editor there will be a bunch of text. Copy and paste it into a code block here in the forums and post it.

This thing is pretty straightforward which makes your situation very puzzling. There is a function called adminblock in mainfile that just reads in the blocks table for records with bkey=admin and stuffs the content into a $content variable for presentation in the block. If the links are good there they should be good on the page.
 
montego







PostPosted: Wed Sep 05, 2007 5:01 am Reply with quote

Yeah, I am stumped as well. Maybe also try posting the function code in mainfile.php for adminblock(). Pleae do NOT post the whole mainfile.php code! Smile Just this function.
 
spyrule







PostPosted: Wed Sep 05, 2007 3:03 pm Reply with quote

Thanks guys,

ok here is the text in source mode first, and then normal view after :

Code:
<strong><big>&middot;</big></strong>&nbsp;<a href="\&quot;admin.php\&quot;">Administration</a><br />

<strong><big>&middot;</big></strong>&nbsp;<a href="\&quot;admin.php?op=adminStory\&quot;">NEW Story</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="\&quot;admin.php?op=create\&quot;">Change Survey</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="\&quot;admin.php?op=content\&quot;">Content</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="\&quot;admin.php?op=logout\&quot;">Logout</a>


Code:


· Administration
· NEW Story
· Change Survey
· Content
· Logout


Here's the odd part, if I edit this, and remove the offending quotes and slashes, as soon as I save them they reappear.

Here is the code for the adminblock() function :

Quote:
function adminblock() {
global $admin, $prefix, $db, $admin_file;
if (is_admin($admin)) {
$sql = 'SELECT title, content FROM '.$prefix.'_blocks WHERE bkey=\'admin\'';
$result = $db->sql_query($sql);
while (list($title, $content) = $db->sql_fetchrow($result)) {
//$content = preg_replace('/\badmin.php/', $admin_file.'.php', $content); //RN6444
$content = '<span class="content">'.$content.'</span>';
themesidebox($title, $content);
}
$title = _WAITINGCONT;
$num = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_queue'));
$content = '<span class="content">';
$content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=submissions">'._SUBMISSIONS.'</a>: '.$num.'<br />';
$num = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_reviews_add'));
$content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=reviews">'._WREVIEWS.'</a>: '.$num.'<br />';
$num = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_links_newlink'));
$brokenl = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_links_modrequest WHERE brokenlink=1'));
$modreql = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_links_modrequest WHERE brokenlink=0'));
$content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=Links">'._WLINKS.'</a>: '.$num.'<br />';
$content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=LinksListModRequests">'._MODREQLINKS.'</a>: '.$modreql.'<br />';
$content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=LinksListBrokenLinks">'._BROKENLINKS.'</a>: '.$brokenl.'<br />';
$num = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_downloads_newdownload'));
$brokend = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_downloads_modrequest WHERE brokendownload=1'));
$modreqd = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_downloads_modrequest WHERE brokendownload=0'));
$content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=downloads">'._UDOWNLOADS.'</a>: '.$num.'<br />';
$content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=DownloadsListModRequests">'._MODREQDOWN.'</a>: '.$modreqd.'<br />';
$content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=DownloadsListBrokenDownloads">'._BROKENDOWN.'</a>: '.$brokend.'<br /></span>';
themesidebox($title, $content);
}
}


Any help here is apreciated,

Spyrule


Last edited by spyrule on Wed Sep 05, 2007 3:09 pm; edited 1 time in total 
spyrule







PostPosted: Wed Sep 05, 2007 3:08 pm Reply with quote

And as a reference ,

This is my edit just before saving the text :

Quote:
<strong><big>&middot;</big></strong>&nbsp;<a href="\admin.php">Administration</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="\admin.php?op=adminStory">NEW Story</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="\admin.php?op=create">Change Survey</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="\admin.php?op=content">Content</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="\admin.php?op=logout">Logout</a>


And this is what I get when I look at the source after saving :

Quote:
<strong><big>&middot;</big></strong>&nbsp;<a href="\&quot;admin.php\&quot;">Administration</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="\&quot;admin.php?op=adminStory\&quot;">NEW Story</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="\&quot;admin.php?op=create\&quot;">Change Survey</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="\&quot;admin.php?op=content\&quot;">Content</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="\&quot;admin.php?op=logout\&quot;">Logout</a>


I seriously stumped...

Where is the code for the wysiwyg editor itself, could this have anything
to do with it?

Also, the only other thing that I can think of is activate mutilanguage, and deleted all but english and french from the language files, could this make a difference?

Thanks in advance,

Spyrule


p.s. - please bring back mr. ninja emot Smile
 
montego







PostPosted: Thu Sep 06, 2007 7:34 am Reply with quote

Why is this line like this:

<strong><big>&middot;</big></strong>&nbsp;<a href="\admin.php">Administration</a><br />

And not:

<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php">Administration</a><br />

I don't understand why you are including the extra "\" in it? Or, was that just a typo in the post.
 
spyrule







PostPosted: Thu Sep 06, 2007 9:15 am Reply with quote

Hey,

Well, as per your suggestions ...

This is what I edited it to :
Code:
<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php">Administration</a><br />

<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php?op=adminStory">NEW Story</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php?op=create">Change Survey</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php?op=content">Content</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php?op=logout">Logout</a>


After saving it , and checking the source again with the editor :
Code:
<strong><big>&middot;</big></strong>&nbsp;<a href="\&quot;admin.php\&quot;">Administration</a><br />

<strong><big>&middot;</big></strong>&nbsp;<a href="\&quot;admin.php?op=adminStory\&quot;">NEW Story</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="\&quot;admin.php?op=create\&quot;">Change Survey</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="\&quot;admin.php?op=content\&quot;">Content</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="\&quot;admin.php?op=logout\&quot;">Logout</a>


This is what I get. So something is messing with the string generation when retreiving the links somehow. Because again when I check the Db (direct copy and paste from the content field) :
Code:
<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php">Administration</a><br />

<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php?op=adminStory">NEW Story</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php?op=create">Change Survey</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php?op=content">Content</a><br />
<strong><big>&middot;</big></strong>&nbsp;<a href="admin.php?op=logout">Logout</a>


what could possibly cause this.... I am faaaar from being an expert in ravennuke to find out what is causing this.

a HUGE thanks in advance,

Spyrule
 
spyrule







PostPosted: Thu Sep 06, 2007 9:16 am Reply with quote

idea,

is their a way to add a strip quote function to just the adminblock() function ?
 
Gremmie







PostPosted: Thu Sep 06, 2007 9:19 am Reply with quote

So you are using the WYSIWYG editor to create the content for this block? Have you mashed down the Source button on the editor before typing in the HTML?
 
spyrule







PostPosted: Thu Sep 06, 2007 10:01 am Reply with quote

Yes, I am using the WYSIWYG editor, and yes I'm using the source button, with it locked down (none of the other menu options are available in this mode).

I've even tried editing it directly in the Db, to no effect or change in outcome.
 
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Thu Sep 06, 2007 4:07 pm Reply with quote

Sounds like another issue of bad stripslashes/addslashes.
First thing I recommend is disabling magic_quotes_gpc and see if that fixes it.

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN Themes Issues

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 ©