Hmm...Now when I think about it you may need to move the News Fader code. With the replaced News Fader code move it after this (code may not match completely):
I seem to be missing a code or a whole bunch of codes here. So...The only option I can think of now is - and this is a bit unorthodox - is to:
- Create a new forum (name doesn't matter). - Turn off the forum. - Add the member you want to have access to the News Fader as a moderator for the forum you've just created.
---------------
Now add the code I gave you in the cp_common.pl file. After you place the code, whenever you find this code (from lines 22 - 260 and excluding the News Fader code):
Code
[/code]replace it with this:
[code]
Now only the member will be able to access the News Fader and nothing else in your CP.
It's rather unorthodox but unless I figure out how to grant access to any member specified or someone else is able to help you this is your best option for now.
quote: Originally posted by PrimeTime: Hehe...I edited the files so that no one (including moderators) have access to the CP except for an admin. I guess the code won't work in your case.
Let me look at it again...
Prime, all this is a little confusing for me.
My forum does not need Moderators. We behave very nice no need for editing nor deleting posts. I dont want to name a Moderator, it would be just a useless title among friends, I dont want to do that, I want to give acceess to a few members/friends to the NewsFader to add news everyday, whoever wakes up first:)
Can you tell me clearly what to do? Thank you my friend.
Err...I think you've missed my point. Anyway, I haven't figured out how to give (selected) members access to the CP...Not yet anyway. I seem to be missing a "key" code somewhere.
**For anyone else who is reading this I'm playing around with "userStatus & $status", "pubname & $pubname", "username & $username", "user_number & $user_number" and "var" in a few UBB files.
Prime, have you checked in cp_lib.cgi? In my Moderator Lockout modification I found a few calls in the cp_lib.cgi and wanted to be sure that everything would be locked down, you may need to add something to allow a moderator to update news.
I don't know 110% if you'd need to do this, but hey its just helpful criticism...
Yup...cp_lib.cgi was one of the files I've looked into. I'm able to grant access to the moderators but Felix wanted specific members. That has been kinda tricky for me.
Initially I thought only the cp.cgi and cp_common.pl files needed to be edited...And maybe it does. Well, so far I haven't found a way. I think if I tinker with it long enough I'll get it but not something I'll use since no one is allowed to access the CP.
Thanks Gizzy for the suggestion...I'll take a look at cp_lib.cgi again.
Prime, I didnt want you go through so much trouble, unless you like tha challange....
Tell me, just a thought, could you use anything from the Calendar? That script allows everybody to add posts, maybe if you work backwards allowing everybody and then go and restrict most of them? I dont know, I am just trying to help, I feel bad for putting this bug into your head...
quote: Originally posted by Brett: why not read it by user number instead of status?
I've never thought about the "$admin_number" as I was focusing on "$user_number" which didn't work obviously. I assumed the "$admin_number" was strictly for users with a status of an administrator.
Now even if I get it so cp.cgi will allow a specific user's number access that will leave cp_common.pl. I'll try something like:
Ahh...Ok. I think this will work. Using the "$admin_number" instead of "$username" or "$pubname" (in cp.cgi) suggested by Brett worked. I then added a few more codes in "cp_common.p" and tested it.
This will allow only one user to have access to the NewsFader via CP.
Prime, I will try this today, I will keep you posted.
While at it, can you add 3 more numabers, just in case. Maybe my site will grow one day and if I have to add more "News Anchors" I wont have to play with the files anymore other than just change 2 digits.
which will ask user designed as News Editor will prompt for Admin name and pass. For admin will work though. I logged as a test member set up to get newsfader access and I get the same login screen
here, you try it for yourself. URL login name and pass: test
Ack...I made a huge error here. I wondered why I was able to gain access and you couldn't. To make a long story short, so happened that the test account I have was in fact a moderator, although one on a testing forum that is enabled "off".
I had to take it out completely because was interfering with the CP. I couldnt view/edit categories! It was saying that I dont have to right to do that? strange.. Once I took your codes out the CP is back to normal and Wordlets reinstated.
The code should not have affected the Administrators functions (logged in as a Administrator) in CP as those settings were never touched. Unfortunately if you logged in as the selected member you won't be able to view anything and will get the error message that you are not allowed. Other than that the CP settings were not compromised.
Unfortunately I tried that Brett earlier today but that too didn't work. I did some other things too which had interesting results but nothing which would validate a selected user to gain access to the CP.
Hey Felix! Thanks to Brett here is the final version for Selected User CP Access. With this mod you can allocate up to 4 members who you want accessing the News Fader configuration:
I think Brett tested it on 6.3 as I did with 6.4...But that shouldn't matter since the codes from 6.3 will work to 6.5 for this hack.
Alright...Try this. Leave that line of code in in cp_common.pl. In addition add the code I stated above. What I'm thinking is that the original News Fader line is the placement inside the dropdown menu. The second NewsFader code with the "admin_number" is for the permissions for your selected members.
Hmm...Please do this. Cut and paste the first NewsFader code and the other NewsFader code that you have in your cp_common.pl file. I need to see what's happening there.
I've looked at it and I didn't see anything wrong with the code...Then again if it doesn't work then obviously something is missing. Umm...Try this:
Find this code (cut it):
Code
[/code]then place it above this code:
[code]
Now I'm not sure if this will make a difference but you have "if(admin_number" and change it to "if (admin_number". Also change the numbers "00000000" to a valid member's number.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.