Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> CNB Your Account
Author Message
KennyW
Hangin' Around



Joined: Jul 15, 2004
Posts: 44

PostPosted: Sat Feb 12, 2005 5:59 pm Reply with quote

Anyone who have this little fix to the Tap problem with CNB,and it seems that evrything works great with the TAP to nuke's orgina YA,but not with the index file in CNB
 
View user's profile Send private message
sixonetonoffun
Spouse Contemplates Divorce



Joined: Jan 02, 2003
Posts: 2496

PostPosted: Sat Feb 12, 2005 8:07 pm Reply with quote

I wouldn't bother 450 will not be friendly to it at all. But I'll be working on a php alternative before the final version of it is released. Other then the userinfo page there is no real good reason to "tap" any of the other pages.

_________________
[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
KennyW







PostPosted: Sat Feb 12, 2005 8:30 pm Reply with quote

And it is just that page i want to work,but it won't work
 
sixonetonoffun







PostPosted: Sat Feb 12, 2005 8:52 pm Reply with quote

Are you using GT or GT Next Gen ? Can you post your rewrites and url in/out arrays we'll see if we can help ya out.
 
mtwo
New Member
New Member



Joined: May 12, 2006
Posts: 23

PostPosted: Sun Mar 04, 2007 5:47 pm Reply with quote

I have the following GoogleTap info and when enabled, the admin link for User administration is /account.html?file=admin , but everything else seems to work.

PN80034 CNB442

----------------------------------------------------------------

GT-Your_Account.php:

Code:


<?php

$urlin = array(
"'(?<!/)modules.php\?name=Your_Account&amp;op=userinfo&amp;username=([a-zA-Z0-9_-]*)'",
"'(?<!/)modules.php\?name=Your_Account&amp;op=([a-z_]*)\"'",
"'(?<!/)modules.php\?name=Your_Account\"'",
);

$urlout = array(
"userinfo-\\1.html",
"account-\\1.html\"",
"account.html\"",
);

?>




.htaccess

Code:



#Your Account
RewriteRule ^userinfo-([a-zA-Z0-9_-]*).html userinfo-.html$1 [L]
RewriteRule ^account-([a-z_]*).html modules.php?name=Your_Account&op=$1 [L]
RewriteRule ^account.html account.html [L]

 
View user's profile Send private message
montego
Site Admin



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

PostPosted: Mon Mar 05, 2007 6:10 am Reply with quote

The third element in the urlin/out arrays are what is causing this. If you really want this tapped and looking right, maybe do something like this:

Code:


<?php

$urlin = array(
"'(?<!/)modules.php\?name=Your_Account&amp;op=userinfo&amp;username=([a-zA-Z0-9_-]*)'",
"'(?<!/)modules.php\?name=Your_Account&amp;op=([a-z_]*)\"'",
"'(?<!/)modules.php\?name=Your_Account&amp;file=admin\"'",
"'(?<!/)modules.php\?name=Your_Account\"'"
);

$urlout = array(
"userinfo-\\1.html",
"account-\\1.html\"",
"account-admin.html\"",
"account.html\""
);

?>



and .htaccess:

Code:




#Your Account
RewriteRule ^userinfo-([a-zA-Z0-9_-]*).html userinfo-.html$1 [L]
RewriteRule ^account-([a-z_]*).html modules.php?name=Your_Account&op=$1 [L]
RewriteRule ^account-admin.html modules.php?name=Your_Account&file=admin [L]
RewriteRule ^account.html account.html [L]


BTW, what you posted earlier for urlin/out should have thrown PHP parse errors... very odd.

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



Joined: Apr 22, 2006
Posts: 356

PostPosted: Fri May 11, 2007 6:57 pm Reply with quote

I am having a similar issue. I have installed this on rn2.10. Now when I am in admin and go to the module, when I try to go to a link to make a change it looks like this:
[ Only registered users can see links on this board! Get registered or login! ]

they all have the account.html?file

When I try to go to a link, if i am also logged in as a user it takes me to MY account page. If I am not logged in as a user it takes me to the login page.

I am a complete dummy and have no idea how to fix this.

I have tried montegos lite version but i need to be able to add fields.

_________________
Kevin Kappes 
View user's profile Send private message
floppydrivez
Involved
Involved



Joined: Feb 26, 2006
Posts: 340
Location: Jackson, Mississippi

PostPosted: Fri May 11, 2007 7:43 pm Reply with quote

Rename GT-Your_Account.php to GT-Your_Accounts.php when you need to use the CNB admin. I am working on the final edition of the tap, but its hard due to the admin.php being a seperate file.

I know I need to step it up. I will do my best to finish it tomorrow. The hidden fields are giving me trouble atm.

_________________
Phpnuke Downloads, Clan Themes, Mack Hankins 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
kevinkap







PostPosted: Fri May 11, 2007 7:53 pm Reply with quote

Thanks,
That works now. Can I leave it renamed or only when managing users?
 
floppydrivez







PostPosted: Fri May 11, 2007 7:54 pm Reply with quote

only when your managing users or the tap is not active. Thats a montego trick the credit really goes to him Smile
 
montego







PostPosted: Mon May 14, 2007 7:02 am Reply with quote

First of all, thank you floppydrivez for assisting here as I have been in Vegas this past weekend and was not even thinking about PHP/nuke... Laughing

Second, to all, I would NEVER recommend tapping the administration functions. First of all, ShortLinks, nor any of its predecessors, do this (although one could "rig it" using ShortLinks and the GTZ-PageTap.php file). Second, there is no value in doing so as the purpose of shortening the links is for better search engine crawling and the administration functions are not accessible to these bots (nor should they).
 
floppydrivez







PostPosted: Mon May 14, 2007 7:13 am Reply with quote

well when authors build in their own admin.php as cnbya does, it leaves us with no choice. Yeah its a headache and If you can figure out how to get around it montego, then cnbya tap is complete.

The only way I can fingle a way around it is to almost redesign the coding layout for the admin side of cnbya to use a layout similiar to most modules.

The ideal fix here would be to turn off shortlinks in the admin.php of cnbya.
 
montego







PostPosted: Mon May 14, 2007 8:04 am Reply with quote

floppydrivez, yeah, my appologies as I have never looked into CNBYA. Are you saying that they are still going through modules.php to do the administration? If so, then, "yes", I'll have to think that one through a bit... Sad
 
floppydrivez







PostPosted: Mon May 14, 2007 8:07 am Reply with quote

montego, yes. The below is kinda the directory structure.

CNBYA
Code:
modules/Your_Account/admin.php


vs

STANDARD
Code:
modules/Your_Account/admin/index.php


So if in admin.php, I could turn off ShortLinks, I think it would solve the problem.
 
montego







PostPosted: Mon May 14, 2007 6:52 pm Reply with quote

floppydrivez, I have not tested this at all, but I am thinking that the right thing to do might be something like this:

=== OPEN ===

header.php

=== FIND ===

Code:


global $tnsl_bUseShortLinks, $tnsl_bAutoTapBlocks, $tnsl_bDebugShortLinks, $tnsl_sGTFilePath;
if (defined('TNSL_USE_SHORTLINKS')) {
    $GLOBALS['tnsl_asGTFilePath'] = tnsl_fPageTapStart();
}


=== REPLACE WITH ===

Code:


global $tnsl_bUseShortLinks, $tnsl_bAutoTapBlocks, $tnsl_bDebugShortLinks, $tnsl_sGTFilePath;
if (defined('TNSL_USE_SHORTLINKS')) {
   global $name;
    if ($name == 'Your_Account' && isset($file) && $file == 'admin') {
        $GLOBALS['tnsl_asGTFilePath'] = '';
    } else {
        $GLOBALS['tnsl_asGTFilePath'] = tnsl_fPageTapStart();
    }
}
 
floppydrivez







PostPosted: Mon May 14, 2007 6:56 pm Reply with quote

It works, but this error occurs.

Code:
Warning: Invalid argument supplied for foreach() in /home/..(mysecretpathway)../includes/tegonuke/shortlinks/shortlinks.php on line 81


Edit: That was lousy error reporting on my part sorry bud. The error only occurs in edit users admin area, but it does work fully. Adding users, saving configs, etc...
 
montego







PostPosted: Mon May 14, 2007 7:14 pm Reply with quote

floppydrivez, well, you should not have warnings showing on your production site. We fixed over 10,000 warnings in RN so you're allowed to have one or two extra right? Wink

I'll keep this on my list of "to-dos" to continue researching. This was only a "quick fix" test of hypothesis. Smile
 
floppydrivez







PostPosted: Mon May 14, 2007 7:17 pm Reply with quote

Well your on the right track friend, plus my production site is still running the old ravennuke and yes I know what I am missing by not upgrading. I am getting to it!! Razz

However I will have a play with the code in shortlinks.php and see what is possible.
 
kevinkap







PostPosted: Mon May 14, 2007 7:57 pm Reply with quote

Ok,

I am running rn2.10. When I add the code to the header.php file and rename the gt file back to what is is supposed to be, the account page is just blank.
 
montego







PostPosted: Tue May 15, 2007 5:58 am Reply with quote

kevinkap, you have introduced either a parse error into header.php or you modified the GT file and introduced it there I am afraid. Please double-check all your edits. Try turning $display_errors in config.php to TRUE to display the error text.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> CNB Your Account

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 ©