Author |
Message |
tangoman
Involved


Joined: Aug 06, 2005
Posts: 301
|
Posted:
Mon Aug 08, 2005 4:21 pm |
|
I have 3 current issues...
Firstly, I am using PHPNuke Version 7.6 with patch 3.0.
I have just made a change in the config.php file and changed the gfx_chk value from 0 to 5.
Of course this now means that in addition to Nickname & Password details, users will now also have to type a security code in order to entre the website.
However, I am also using the User Info block and if I try to log in via this, I can, without having to add any extra security code.
Other than to deactivate the User Info block, how can I proceed?
Ideally I would like the security code to be part of the log in proceedure, whether a user is loggin in via the 'My Account' page or via the User Info block.
I have also tried substituting the 5 for 7, but still no luck,
Secondly, I want to customise the standard text that is included when a mass e-mail/newsletter is sent to members, but I need to know which PHP-Nuke file I need to modify and the directory it is in?
Finally for now, I changed the admin page url in the config.php file from admin.php and I am able to use the new page/url without a problem. However when I click 'logg out' on the Admin block, it resolves a standard 'page not found' message. I think this is because I need to change the URL of the log out link and the other links in the admin block. If I am correct, please can you confirm which PHP-Nuke file I need to modify and the directory it is in? |
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Mon Aug 08, 2005 4:52 pm |
|
Please post or PM (in between code tags) the contents of the blocks/block_UserInfo.php file you are using (it may have a different name).
For the newsletter text, check /admin/language/lang-xxxx.php where the x's are the appropriate language for your site. You can edit that file with a programming text editor (i.e. NOT with notepad). Make a backup of the original before uploading to your site (or allow your FTP client to rename the original instead of overwriting). NOTE: If you add any text that contains apostrophes, put a \ in front of the apostrophe (e.g. that's should be stored in the language file as that\'s).
Incredibly, the bad link to the admin.php file is IN the admin.php file (or whatever you renamed it). Use the same programming text editor to find and replace the 3 or more instances of admin.php with the new file name (I'd send the code to fix this problem, but don't have time at the moment). |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
 |
kguske

|
Posted:
Mon Aug 08, 2005 5:06 pm |
|
For the graphic to display in the block, replace:
Code: $content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">";
$content .= "<input type=\"hidden\" name=\"gfx_check\" value=\"$code\">";
|
with:
Code:// $content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">";
// $content .= "<input type=\"hidden\" name=\"gfx_check\" value=\"$code\">";
if (extension_loaded("gd") AND ($gfx_chk == 2 OR $gfx_chk == 4 OR $gfx_chk == 5 OR $gfx_chk == 7)) {
$content .= ""._SECURITYCODE.": <img src='?gfx=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'><br>\n";
$content .= ""._TYPESECCODE."<br><input type=\"text\" NAME=\"gfx_check\" SIZE=\"7\" MAXLENGTH=\"6\">\n";
$content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\"><br>\n";
} else {
$content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">";
$content .= "<input type=\"hidden\" name=\"gfx_check\" value=\"$code\">";
}
|
Or PM your email address and I'll send the updated block. |
Last edited by kguske on Mon Aug 08, 2005 6:23 pm; edited 1 time in total |
|
|
 |
tangoman

|
Posted:
Mon Aug 08, 2005 6:01 pm |
|
That replacement code had no effect in the apperance or operation Kevin? there is still no graphic displayed and I am able to logg in with just the Nickname & Password.
What else can we try? |
|
|
|
 |
kguske

|
Posted:
Mon Aug 08, 2005 6:05 pm |
|
Sorry! That code includes the YA hack... that's why it isn't working. Let me check and I'll update. |
|
|
|
 |
tangoman

|
Posted:
Mon Aug 08, 2005 6:10 pm |
|
The block you just sent me appeared to contain the exact code you previosuly.
Neither worked, so I await your further advise etc.
Thanks in anticipation. |
|
|
|
 |
kguske

|
Posted:
Mon Aug 08, 2005 6:33 pm |
|
Updated posting above and resent block file.
In your config.php file, is there a line that looks something like:
Code:$admin_file = "admin";
|
where "admin" is the name of your renamed admin.php file without the .php extension? Do any of the admin functions work or just not logout? |
|
|
|
 |
tangoman

|
Posted:
Mon Aug 08, 2005 6:34 pm |
|
Kevin,
I now have the block you e-mail me ftped to the server, but still the user info block does not display a security graphic and it allows me to sign in without the serutiry number. |
|
|
|
 |
kguske

|
Posted:
Mon Aug 08, 2005 6:36 pm |
|
What is $gfx_chk set to in your config.php file? Is it working in the block-Login.php block? |
|
|
|
 |
kguske

|
Posted:
Mon Aug 08, 2005 6:38 pm |
|
It needs to be set to 2, 4, 5 or 7 to display on the Login block and the UserInfo block. |
|
|
|
 |
tangoman

|
Posted:
Mon Aug 08, 2005 6:44 pm |
|
kguske wrote: | Updated posting above and resent block file.
In your config.php file, is there a line that looks something like:
Code:$admin_file = "admin";
|
where "admin" is the name of your renamed admin.php file without the .php extension? Do any of the admin functions work or just not logout? |
I assume this message is in relation to the problems I was having when attempting to rename the links in the admin.php block . While sorting the User Info block problems, I decided to change the admin.php file back to its original name, (adnin.php), so as not to complicate matters.
When I do rename it the problem is that whichever link I click on in the admin block, (even log out), the result is a 'page cannot be found' message. Because of this I am not able to logg of at that stage and as I previously mentioned my susspision was that i would have to change the details of the links in the admin block.
You agreed this was what i had to do, But I was simply not confident in doing this because there are so many instances of the string 'admin' in the relivant file, (admin.php). |
|
|
|
 |
kguske

|
Posted:
Mon Aug 08, 2005 6:49 pm |
|
In addition to renaming the admin.php, you must change this line
Code: $admin_file = "admin";
|
in your config.php file.
For example, if you rename admin.php to be myadmin.php, you should change the config.php file line to be:
Code: $admin_file = "myadmin";
|
Everything should work correctly then. |
|
|
|
 |
tangoman

|
Posted:
Mon Aug 08, 2005 7:00 pm |
|
Yes...I did all that kevin and it worked great...
But the problem was this:
I changed the admin page url in the config.php file from admin.php and am able to use the new page/url without a problem. However when I click 'log out' on the Admin block (or any other link in the block), it resolves a standard 'page not found' message. I thought it may be because I need to change the URL of the log out link and the other links in the admin block and you agreed, explaining that I need to change all the instances of the string 'admin.php' in the admin.php file.
However I was simply not confident in doing this because there are no instances of admin.php in the admin file and although there ARE many instances of the string 'admin' in the relivant file, (admin.php), I was not sure if these should all be changed. I mean one example is the string in the 2nd line of the script:
if($aid AND (!isset($admin) OR empty($admin)) AND $op!='login') {
Also, there are NO instances of admin.php as you explained, but many with a string akin to the one in the following string:
."<form action=\"".$admin_file.".php\" method=\"post\">" |
|
|
|
 |
kguske

|
Posted:
Mon Aug 08, 2005 7:39 pm |
|
I was incorrect - my statement was based on the 7.5 version I use, not 7.6. You should NOT need to change anything in the the admin.php file - just the setting in the config.php and rename the file, of course. What page is it trying to resolve when it displays the page not found message? |
|
|
|
 |
tangoman

|
Posted:
Mon Aug 08, 2005 7:59 pm |
|
Kevin,
I have noted what is happening now...I just need help with putting my finger on where I DO need to make a small change...I am sure I will need to do so in one of the files.
As I explained, when I redefine the admin file in config.php and rename the admin.php file itself, ALMOST everything works OK.
When you are logged in, the begining of the Admin Block is layed out a little like the following:
Administration
· Administration
· NEW Story
· Change Survey
· Content
· Logout
Waiting Content
· Submissions: 0
· Waiting Reviews: 0
· Waiting Links: 0
· Mod. Links: 0
· Broken Links: 0
· Downloads: 0
· Mod. Downloads: 0
· Broken Downloads: 0
I have noted that when I make the aformentied changes, the URL of the ALL links below the 'Waiting Content' title have a new URL (containing the name of the newly defined admin.php file), but the links above these and under the title 'Administration' do not alter, (ie their URL does not change to contai the name of the newly defined admin.php file).
Because of this, when I do click on the links, they try to resolve the original URL, hence I recieve the standard 'page not found' dll report...Just like when you open up IE but you are not connected to the Internet.
In addition, because the Logout link is one of the links that does not change to the new URL, it also resolves the standard 'page not found' dll report, thus does not log you out.
So what needs to be done to resolve this?
Finally for now, I am still having problems with the other problem of no security graphic in the user info block, even after using the one you e-mailed me. I am still able to log in just with a Nickname/Username and Password. |
|
|
|
 |
kguske

|
Posted:
Mon Aug 08, 2005 8:08 pm |
|
Now I understand the admin problem. I will check the 7.6 version I downloaded and send you something.
On the user info block issue, I still need to know the setting of the $gfx_check variable in your config.php file. It needs to be set to 2, 4, 5 or 7 to display on the Login block and the UserInfo block. Does it show correctly on the block-Login.php block? |
|
|
|
 |
kguske

|
Posted:
Mon Aug 08, 2005 8:19 pm |
|
It's not a file change - it's stored in the database.
In Admin, blocks (administration), edit the "Administration" block that is displayed on the left after the Modules block. There is HTML defined there that contains the admin.php file. Replace all the admin.php with the myadmin.php (or whatever the renamed admin file name is). |
|
|
|
 |
kguske

|
Posted:
Mon Aug 08, 2005 8:23 pm |
|
Regarding the block-UserInfo.php change, I forgot to add a global reference to the $gfx_chk field in the block, thus it was treating it as if it were null - not the value that you set in config.php. I sent an update that should correct that and work properly when deployed. Sorry for the confusion. |
|
|
|
 |
tangoman

|
Posted:
Mon Aug 08, 2005 9:00 pm |
|
Kevin!....3 out of 3 solved.........I hate keep telling you it isnt working all the time.....particularly as I am so new to this and assume it must be ME doing something wrong etc!!!...Anyhow, its all a great learning experience, I think you will agree.
I have been on the PC for 15 hours today.........with only 2 hours break betweek that time!.......Started at 10am local time.....and off to be in 10 minutes, at 4:00am....care to guess where I am?
Thank you SO SO much for your help so far.
Finally though for today is that my next task will be to build some content for the website, hence I need to learn how to build a module etc. I had tried 'cheating by pasting the code into a message or content posting, but I had problems as desxcribed below, hence I understand the Java Script can only be used within the structure of a moduule that I build myself:
I have just tried to post a message on the site I am building.
The content is full of HTML and Java Script.
When I try to save/post the message, I received the following warning:
'The html tags you attempted to use are not allowed'
I have narrowed the cause of the problem down to the java scrips, by trying the post without them, (which worked).
The java scrips are there in order to make a new window pop up when the user clicks on a link.
I guess I could use the option of 'Target Blank' for opening a link in new window, however I need to use the java script menthod because I wanted a new window to open to a specific size and located in a specific place on the screen.
I have searched other forums (i.e. 'How To') for the solution, but cannot see anything about pop up windows.
Anyone know the solution to this? |
|
|
|
 |
kguske

|
Posted:
Mon Aug 08, 2005 9:11 pm |
|
I'm very happy your remaining issues are resolved - I've had a long day, too. I'd recommend opening a new thread for this issue, as few are likely to read through all these messages to see this last post.
Since I'm here, these are my thoughts on this latest question:
Like most things, there are several options. You can add javascript to the includes/javascript.php file, then reference it from content, messages, etc. But you would still have issues with the Javascript tags unless you modify your config.php to allow additional tags. That's not a trivial process and requires a good understanding of what to do and what not to do.
Many others and I have posted extensively about details for this here and on other sites, but for now, I'd recommend working around the limitations. |
|
|
|
 |
|