Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ![]() Interested in joining? Click here. If you are already a member of ZBCode, feel free to login right here: |
| Please help me improve this code! | |
|---|---|
| Tweet Topic Started: Nov 8 2008, 04:17 PM (271 Views) | |
| rockon1824 | Nov 8 2008, 04:17 PM Post #1 |
|
I never know what to put for my member title. =(
![]()
|
A little background info: I run a music forum on Zetaboards, and users can submit music-related articles and reviews to be put on our adjoining website. I wanted to make it so you could find links to all the articles and reviews a user has submitted in their profile on the forum. So I set up two custom profile fields, titled Articles and Reviews, respectively. Then I edited these profile fields for each user who had submitted an article and/or review with either "usernameart" or "usernamerev" (for example, mine would be "rockon1824art" in my Articles profile field and "rockon1824rev" in my Reviews profile field). Then I drew up this code, which works, but it's pretty inefficient (my coding skills are very limited): I have one of these lines for each user who has submitted an article and each user who has submitted a review. Considering many users have submitted more than one article/review, these lines increase with multiple links, making for a pretty unruly JavaScript file. (Here's the current one.) How could I pare this down to make it easier to add these links to users' profiles? So far I've come up with this, which is a little better, but not by much: It would be best to have it so I could add the links through a function as well, but I'm not sure how to do that. Any help with this would be greatly appreciated. Thanks.
|
| |
![]() |
|
| Fission | Nov 8 2008, 08:03 PM Post #2 |
![]()
Weegee
![]()
|
Self promotion go! Linkable Profile fields. So easy you might get pelted with stones for using an over-used saying. |
Floatboxes. They float. || ![]()
| |
![]() |
|
| rockon1824 | Nov 8 2008, 09:05 PM Post #3 |
|
I never know what to put for my member title. =(
![]()
|
That's a great code, but since it's for 1-line text fields, it wouldn't really work if the user has more than one article or review.
|
| |
![]() |
|
| Fission | Nov 8 2008, 11:00 PM Post #4 |
![]()
Weegee
![]()
|
So you are using a text box? That's different... I could edit my code a |
Floatboxes. They float. || ![]()
| |
![]() |
|
| rockon1824 | Nov 9 2008, 08:32 AM Post #5 |
|
I never know what to put for my member title. =(
![]()
|
Yeah, I'm using a text-box for it. Thanks a ton, I really appreciate the help.
|
| |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Code University · Next Topic » |

















7:45 PM Jul 10