Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Oct 2000
Posts: 215
Member
Member
Offline
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:
Code
code:
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.
Sponsored Links
Joined: Oct 2000
Posts: 215
Member
Member
Offline
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.
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


- Allen wavey
- What Drives You?
Joined: Oct 2000
Posts: 215
Member
Member
Offline
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] 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.
Joined: Feb 2000
Posts: 4,625
Member
Member
Offline
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]



------------------
UBBDEV Moderator
OCCUPATION: Programmer, webmaster.
Read my BIO in the team link!

Sponsored Links
Joined: Oct 2000
Posts: 215
Member
Member
Offline
Joined: Oct 2000
Posts: 215
Yeah, I'm new to Perl and didn't know about the seperate numerical and string comparisons, [Linked Image] 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.
Joined: Aug 2000
Posts: 25
Member
Member
Offline
Joined: Aug 2000
Posts: 25
Umm not to put a damper on the spirit of things.. but is this any different than Jaxel's mod to Skalos's hack?
https://www.ubbdev.com/ubb/Forum7/HTML/000258.html

------------------
Billy Bandit
Bandit Boys

Joined: Oct 2000
Posts: 215
Member
Member
Offline
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]


Ultimate Frisbee is good for you, it improves your symbolic logic skills.
Joined: Aug 2000
Posts: 25
Member
Member
Offline
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

Joined: Oct 2000
Posts: 215
Member
Member
Offline
Joined: Oct 2000
Posts: 215
We can call it good work when I get it working right [Linked Image] 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.
Sponsored Links
Joined: Oct 2000
Posts: 215
Member
Member
Offline
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.
Joined: Aug 2001
Posts: 2
Junior Member
Junior Member
Offline
Joined: Aug 2001
Posts: 2
Hi, The link to this hack is broken and I am in need of it, please help me out.

Joined: May 2001
Posts: 6,708
Member
Member
Offline
Joined: May 2001
Posts: 6,708
Go to spawn.piratecove.org/ubbmods and look for it, Not sure if it's there though.

Joined: Oct 2000
Posts: 215
Member
Member
Offline
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.
Joined: Aug 2000
Posts: 569
Member
Member
Offline
Joined: Aug 2000
Posts: 569
ugh !
Any luck on finding it ?


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,575
Posts293,931
Members13,823
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)