PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
spyrule
Worker
Worker


Joined: Jun 06, 2006
Posts: 105

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

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 to the forums!
"admin.php/"

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

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

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

· Logout =
Only registered users can see links on this board!
Get registered or login to the forums!
"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 Back to top

Go into your admin panel, blocks, and edit the Administration block.
View user's profile Send private message
spyrule
Worker
Worker


Joined: Jun 06, 2006
Posts: 105

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

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

How is this happening?!?
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 5:42 pm Reply with quote Back to top

I dunno, works for me. Are you using the WYSIWYG editor? Do you have short links or rewrite rules on?
View user's profile Send private message
spyrule
Worker
Worker


Joined: Jun 06, 2006
Posts: 105

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

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?
View user's profile Send private message Visit poster's website
montego
Site Admin


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

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

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.
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 9:00 pm Reply with quote Back to top

Hey that's my fix! Smile
View user's profile Send private message
spyrule
Worker
Worker


Joined: Jun 06, 2006
Posts: 105

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

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
View user's profile Send private message Visit poster's website
montego
Site Admin


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

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

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.
View user's profile Send private message Visit poster's website
spyrule
Worker
Worker


Joined: Jun 06, 2006
Posts: 105

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

Yeah,

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

Where in the database are those strings stored?
View user's profile Send private message Visit poster's website
montego
Site Admin


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

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

It is in table nuke_blocks and look for a bkey of admin
View user's profile Send private message Visit poster's website
spyrule
Worker
Worker


Joined: Jun 06, 2006
Posts: 105

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

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
View user's profile Send private message Visit poster's website
montego
Site Admin


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

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

mainfile.php in that function that I mentioned above.
View user's profile Send private message Visit poster's website
fkelly
Moderator


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

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

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
Worker
Worker


Joined: Jun 06, 2006
Posts: 105

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

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.
View user's profile Send private message Visit poster's website
fkelly
Moderator


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

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

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.
View user's profile Send private message Visit poster's website
montego
Site Admin


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

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

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.
View user's profile Send private message Visit poster's website
spyrule
Worker
Worker


Joined: Jun 06, 2006
Posts: 105

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

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
View user's profile Send private message Visit poster's website
spyrule
Worker
Worker


Joined: Jun 06, 2006
Posts: 105

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

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
View user's profile Send private message Visit poster's website
montego
Site Admin


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

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

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.
View user's profile Send private message Visit poster's website
spyrule
Worker
Worker


Joined: Jun 06, 2006
Posts: 105

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

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
View user's profile Send private message Visit poster's website
spyrule
Worker
Worker


Joined: Jun 06, 2006
Posts: 105

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

idea,

is their a way to add a strip quote function to just the adminblock() function ?
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: Thu Sep 06, 2007 9:19 am Reply with quote Back to top

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?
View user's profile Send private message
spyrule
Worker
Worker


Joined: Jun 06, 2006
Posts: 105

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

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.
View user's profile Send private message Visit poster's website
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

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

Sounds like another issue of bad stripslashes/addslashes.
First thing I recommend is disabling magic_quotes_gpc and see if that fixes it.
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.

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum