|
Joined: Oct 2000
Posts: 290
Member
|
Member
Joined: Oct 2000
Posts: 290 |
OK here goes. Another hack gave me the idea as to how to accomplish what I want to do. I have a control panel area that lets me configure who is assigned a scrapbook. Basically, the scrapbooks are already in another part of the board, so all I wanted was to put a link (as I have) for each user who has a scrapbook. It is a up to me to configure a username for a scrapbook in the control panel. What I do is go into the control panel area I created, and I can insert a username and a corresponding scrapbook number. Not everyone has a scrapbook, so I needed to be able to assign a number based on manually entering the data for a username. The info is entered as |!!|, and it is here that the scrap-list file is created. This works...it works for the original hack (which is used by Admin only to assign a custom title, or custom titles based on post counts). Anyway, that part of the hack works as I have checked the members folder for the scrap-list.file and the proper entries. I did not want to add this to the profile, I only want it controlled by Admin.
So, I enter the data for a username, one per line, and it is written to the scrap-list.file (my little database), then it is called by the above bit of code and should give each configured user a blue folder with the proper scrapbook number.
Did any of that make sense?? ![[Linked Image]](https://ubbdev.com/ubb/smilies/smile.gif)
For the original hack, written by Jimbo (make sure credit given where due), I enter a username in the format described above and the title I want. You notice that it works because all the titles on the page listed above are assigned by that hack. So I figured the same thing should happen with my little addition. Here is the whole sub-routine including what I added. This sub is called by ubb_library2.pl where $ThisStatus is assigned:
sub ParseUserTitles{ # Check for Post Count titles my @posttitles = &OpenFile("$MembersPath/title-list2.file");
foreach $thisline(@posttitles) { my @postnumtitles = split(/|!!|/, $thisline); chomp($postnumtitles[1]);
if ($thisprofile[7] > $postnumtitles[0]) { $ThisStatus = "$postnumtitles[1]"; } }
# Check for Admin / Moderator Titles if ($thisprofile[8] eq "Administrator") { $ThisStatus = "$AdminTitle"; } elsif ($thisprofile[8] eq "Moderator") { $ThisStatus = "$ModeratorTitle"; }
# Check for Username Specific Titles my @spectitles = &OpenFile("$MembersPath/title-list.file");
foreach $thisline(@spectitles) { my @titles = split(/|!!|/, $thisline); chomp($titles[1]);
if ($thisprofile[0] eq "$titles[0]") { $ThisStatus = "$titles[1]"; } }
# Check for Scrapbook my @scrapbook = &OpenFile("$MembersPath/scrap-list.file");
foreach $thisline(@scrapbook) { my @scraps = split(/|!!|/, $thisline); chomp($scraps[1]); $ThisScrap = ""; if ($thisprofile[0] eq "$scraps[0]") { $ThisScrap = qq(
); } } } # end smart title parsing routine
Zanardi, I am very happy to have your expertise, and I think you, more than I can put into words here, for your help
------------------ Tony (Vipermad) Rickard Viper Club UBB Admin
|
|
|
Entire Thread
|
So close, but I need some help please!
|
Vipermad
|
01/05/2001 3:49 PM
|
Re: So close, but I need some help please!
|
Greg Hard
|
01/05/2001 10:46 PM
|
Re: So close, but I need some help please!
|
zanardi
|
01/06/2001 2:43 AM
|
Re: So close, but I need some help please!
|
Vipermad
|
01/06/2001 5:28 PM
|
Re: So close, but I need some help please!
|
zanardi
|
01/06/2001 6:57 PM
|
Re: So close, but I need some help please!
|
Vipermad
|
01/06/2001 8:10 PM
|
Re: So close, but I need some help please!
|
zanardi
|
01/07/2001 8:38 PM
|
Re: So close, but I need some help please!
|
Vipermad
|
01/07/2001 10:02 PM
|
Re: So close, but I need some help please!
|
zanardi
|
01/08/2001 1:09 AM
|
Re: So close, but I need some help please!
|
Vipermad
|
01/08/2001 2:27 AM
|
Re: So close, but I need some help please!
|
zanardi
|
01/08/2001 5:08 AM
|
|
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.
|
|
Posts: 69
Joined: January 2001
|
|
Forums63
Topics37,575
Posts293,932
Members13,824
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|