#42938
10/23/2000 2:26 PM
|
Joined: Oct 2000
Posts: 215
Member
|
Member
Joined: Oct 2000
Posts: 215 |
Ok. I modified the Stars Hack 2000 by Dawg911 to work with Custom Titles. I used Skalos' Edit Profiles in CP hack to add a Custom Title field in the member profile. I had it working in a fairly similar code structure to Dawg911's, but then I decided I wanted to rewrite it completely to use a stars configuration file and for loops in preperation for writing a CP configuration utility. It seems to be working almost perfectly. I've got one problem that I can't figure out though. In the following line: It ALWAYS comes back as true. And it's not that it always shows the status = Admin, I changed it to Moderator and it still came back as true. I tried moving things around, checked how everything was bracketed, variable names, all that, and the first if statement in there ALWAYS comes back as true. Custom Titles work, but it will always display the stars assigned to Admin, and if a custom title isn't assigned, it will give them the title of Administrator. I need help figuring out the problem in this bit of code and it should be done. Let me know if you think you've got it. Thanks. www.uotwo.com/mods/Stars2.zip This message has been edited by Ramirez on October 23, 2000 at 02:28 PM
Ultimate Frisbee is good for you, it improves your symbolic logic skills.
|
|
|
#42939
10/23/2000 2:32 PM
|
Joined: Oct 2000
Posts: 215
Member
|
Member
Joined: Oct 2000
Posts: 215 |
Oh, this is made for 5.47, btw.
Ultimate Frisbee is good for you, it improves your symbolic logic skills.
|
|
|
#42940
10/23/2000 3:26 PM
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Good work Ramirez, I will check it out on my next project... ------------------ Allen - http://www.stand318.com
|
|
|
#42941
10/25/2000 2:03 PM
|
Joined: Oct 2000
Posts: 215
Member
|
Member
Joined: Oct 2000
Posts: 215 |
Ok, well I fixed the first problem, which was caused by me not knowing Perl very well. I was using numerical comparison operators instead of string ![[Linked Image]](https://ubbdev.com/ubb/smilies/tongue.gif) I'm working on some other bugs right now and hopefully I'll get it ready soon. I'm going to work on the CP addon tonight.
Ultimate Frisbee is good for you, it improves your symbolic logic skills.
|
|
|
#42942
10/25/2000 3:02 PM
|
Joined: Feb 2000
Posts: 4,625
Member
|
Member
Joined: Feb 2000
Posts: 4,625 |
I am probably late, but... if ($ThisStatus eq "Administrator") { if ($ThisStatus = "Administrator") { is a very bad coding. ![[Linked Image]](https://ubbdev.com/ubb/smilies/biggrin.gif) ------------------ UBBDEV Moderator OCCUPATION: Programmer, webmaster. Read my BIO in the team link!
|
|
|
#42943
10/25/2000 5:13 PM
|
Joined: Oct 2000
Posts: 215
Member
|
Member
Joined: Oct 2000
Posts: 215 |
Yeah, I'm new to Perl and didn't know about the seperate numerical and string comparisons, ![[Linked Image]](https://ubbdev.com/ubb/smilies/tongue.gif) Once I read about that I went back through it all and checked my comparisons and fixed those all up. Now I'm working on my for loop. Is there anything similar to an 'exit for' statement in Perl? What's the best way to get out of a for statement?
Ultimate Frisbee is good for you, it improves your symbolic logic skills.
|
|
|
#42945
10/28/2000 1:56 AM
|
Joined: Oct 2000
Posts: 215
Member
|
Member
Joined: Oct 2000
Posts: 215 |
Yes, it is completely different. The code used to do this is much smaller for one thing. It uses a profile field instead of keeping all the custom titles in one file. It also lets the stars hack still compute the number of stars when you have a custom title instead of having to assign stars to a person with a custom title. It uses a stars setup file for the titles and break points so you don't have to code it into ubb_library2.pl, and that makes the code a lot smaller since it loops through the if statement. It should be faster since I'm trying to minimize the number of comparisons, and the original stars hack checks every single level break point for each person. Ummm, since it uses a profile field, you can change a user's title with the edit profile in CP hack. And since I'm using a stars setup file I can create a CP addon to add new levels, delete levels, rename and change break points for levels, all without changing the code. So, yeah, it's different ![[Linked Image]](https://ubbdev.com/ubb/smilies/smile.gif)
Ultimate Frisbee is good for you, it improves your symbolic logic skills.
|
|
|
#42946
10/28/2000 11:40 AM
|
Joined: Aug 2000
Posts: 25
Member
|
Member
Joined: Aug 2000
Posts: 25 |
Thanks for the explanation! It sounds good! I made a modification to the Jimbo/Skalos/Jaxel Custom Title hack that allowed stars to be computed instead of assigned. Although the custom title part of it was still kept in one file and not a field in the profile like you have done. Keep up the good work! ------------------ Billy Bandit Bandit Boys
|
|
|
#42947
10/28/2000 6:10 PM
|
Joined: Oct 2000
Posts: 215
Member
|
Member
Joined: Oct 2000
Posts: 215 |
We can call it good work when I get it working right ![[Linked Image]](https://ubbdev.com/ubb/smilies/wink.gif) hehe ------------------ Member of the new, public-friendly Illuminati. Ask for details!New members get a complimentary one-year subscription to the new Cheese of the Month E-Club!
Ultimate Frisbee is good for you, it improves your symbolic logic skills.
|
|
|
#42948
11/02/2000 10:24 PM
|
Joined: Oct 2000
Posts: 215
Member
|
Member
Joined: Oct 2000
Posts: 215 |
Ok, this is done and working like a champ now. I'll test it over the weekend, then redocument and post the finished code in finished hacks early next week. I'll try to get the CP addon done this weekend to go with it too.
------------------ Member of the new, public-friendly Illuminati. Ask for details! New members get a complimentary one-year subscription to the new Cheese of the Month E-Club!
Ultimate Frisbee is good for you, it improves your symbolic logic skills.
|
|
|
#42949
08/09/2001 12:28 AM
|
Joined: Aug 2001
Posts: 2
Junior Member
|
Junior Member
Joined: Aug 2001
Posts: 2 |
Hi, The link to this hack is broken and I am in need of it, please help me out.
|
|
|
#42950
08/09/2001 1:31 AM
|
Joined: May 2001
Posts: 6,708
Member
|
Member
Joined: May 2001
Posts: 6,708 |
Go to spawn.piratecove.org/ubbmods and look for it, Not sure if it's there though.
|
|
|
#42951
08/09/2001 5:10 AM
|
Joined: Oct 2000
Posts: 215
Member
|
Member
Joined: Oct 2000
Posts: 215 |
I'm looking for this file now. It's been almost a year since I made it and I've been on 6.0 since it came out, so I'm having a hard time. I might be able to rebuild the hack from backups of my old ubb files.
Ultimate Frisbee is good for you, it improves your symbolic logic skills.
|
|
|
#42952
02/25/2002 11:41 AM
|
Joined: Aug 2000
Posts: 569
Member
|
Member
Joined: Aug 2000
Posts: 569 |
ugh ! Any luck on finding it ?
|
|
|
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: 1,157
Joined: July 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|