Rhune
Not New Member
[Sj1:0]
Posts: 11
Rhune said 0 great things
|
Post by Rhune on Jul 1, 2010 20:43:14 GMT -8
Is there any way I can get a code that does the same thing, or similar to The "second member group" code by Dogmaster. I'm basically trying to get it so I can have a "pack rank" and a "Power" section since the pack ranks are already using the member titles, and the pack colors are already using the groups.
Wow, I'm being confusing. I'll try to make this sound less like I'm rambling. There are already Member groups, and also member Titles. On my site, I am currently using the Member Titles to list the Ranks of each character in a pack. And the member groups are being used for the listing of which pack each character is in. So, with that in mind, I am trying to get another area that is only admin-editable where I can add images to list the type of power they have. I was going to use the "items" code, but it really conflicts with my mini-profiles. So maybe a second member title? or group? or maybe some kind of code like the Items code that doesn't conflict with other mini-profile hacks and money codes..?
|
|
|
Post by Wormopolis on Jul 1, 2010 22:34:05 GMT -8
I was going to suggest crossfury, but that conflicts with money codes I think. Its worth a shot though. see if crossfury will work for you.
|
|
Rhune
Not New Member
[Sj1:0]
Posts: 11
Rhune said 0 great things
|
Post by Rhune on Jul 2, 2010 18:15:21 GMT -8
The code doesn't seem to be working for me. My siteI need a code that allows for Images to be shown, not just text. Is there a way for the crossfury to allow codes to be shown?
|
|
|
Post by Wormopolis on Jul 2, 2010 20:15:43 GMT -8
that is a good question. I was under the impression that crossfury would let you put images in there, but I have never ran crossfury myself (I have never had a need to).
if this is something small, a new code could be written just for you to use on your site. when you want something that ONLY admins can edit, it usually requires storage in the custom title area (so that members dont have access to it). do you currently have any codes that utilize the custom title area? CT is allowed about 100 characters, so you wouldnt be able to have infinite storage space in there. if you had an array of images for thngs they can acquire, you could probably store about 50 comfortably, but that depends on if you have other stuff in CT you want to keep. codes like this will pretty much takeover the space.
|
|
Rhune
Not New Member
[Sj1:0]
Posts: 11
Rhune said 0 great things
|
Post by Rhune on Jul 2, 2010 21:13:27 GMT -8
Uhm, I can check, I am not really sure though, maybe the money hack I am using right now might.
I only have up to 16 images that I will ever need to use. Array would be like how the items code has you host all of the images that you want to use in the same place, and just uses the ones with that same name right?
Sorry I'm still a little new at this..
|
|
|
Post by Wormopolis on Jul 2, 2010 21:36:03 GMT -8
typically when I write codes like this, I use an array that stores the title of the image, and the URL to the image itself. The index of where it is in the array is what gets stored. Then when you want to display the tiem in a profile, you look at the stored string, extract whatever indexes have been stored in it, grab from the array (since its global it can be accessed anytime), and insert the image into the destination. for really large arrays, I have used number encryption to shrink down the strong stored so that a binary string like
1000100100010
which would show images indexed 0, 4, 7, and 11
gets turned into
4386
and can be even further condensed if using a larger number base like 32 instead of 10
492 (base 32)
so you can see that a 3 digit number can be stored that reflects what items would be switched on from that array. a second number could be stored if you also wanted a title to appear from a second array. compacting data like this can also help if you have other codes storing in CT and they dont already take up all the space.
|
|
|
Post by Wormopolis on Jul 2, 2010 21:42:21 GMT -8
the largest array easily stored is 60 items then. more items would require storing additional numbers
|
|
Bones
Code Helper
Posts: 131
Bones said 0 great things
|
Post by Bones on Jul 3, 2010 1:00:12 GMT -8
typically when I write codes like this, I use an array that stores the title of the image, and the URL to the image itself. The index of where it is in the array is what gets stored. Then when you want to display the tiem in a profile, you look at the stored string, extract whatever indexes have been stored in it, grab from the array (since its global it can be accessed anytime), and insert the image into the destination. for really large arrays, I have used number encryption to shrink down the strong stored so that a binary string like 1000100100010 which would show images indexed 0, 4, 7, and 11 gets turned into 4386 and can be even further condensed if using a larger number base like 32 instead of 10 492 (base 32) so you can see that a 3 digit number can be stored that reflects what items would be switched on from that array. a second number could be stored if you also wanted a title to appear from a second array. compacting data like this can also help if you have other codes storing in CT and they dont already take up all the space. That's the first time I've ever seen bit mapping suggested in any language except machine code Wormo. The drawback of course is how to set the turned on bits since js has no XOR operator. I assume you plan to loop through the array and build the bit map that way. Then on the other end use arithmetic shift raised to the base 2 power of the digit to convert back to indices, intriguing. Did you ever do opcode assembly and if so which processors? PM me at PBS
|
|
Rhune
Not New Member
[Sj1:0]
Posts: 11
Rhune said 0 great things
|
Post by Rhune on Jul 3, 2010 1:23:09 GMT -8
Alright, well that sounds good to me!
|
|
|
Post by Wormopolis on Jul 3, 2010 4:22:37 GMT -8
Eton,
I left out some crucial parts about reversing the string before storing or the leading zeros will get interpreted wrong. I have used this method a coupe times before on things and it seems to work well. the disadvantage is that its just a flag bit. there is not storing of quantities of things. it wouldnt work for something like a shop code.
Rhune: I will see what I can muster up this weekend.
|
|
|
Post by Wormopolis on Jul 4, 2010 0:35:49 GMT -8
Rhune.. is it that you will ONLY ever select 1 thing from the array or will you be selecting multiple things?
and where in the MPs are we going to be putting stuff? In order to keep this from interfering with your other codes, Im going to write it so it runs after everything else and targets what has already been changed. pretty much making this code only work on your site (or I guess anyone who runs all the same codes you do by coincedence).
|
|
Rhune
Not New Member
[Sj1:0]
Posts: 11
Rhune said 0 great things
|
Post by Rhune on Jul 5, 2010 17:11:42 GMT -8
Yeah, only ever one thing. Uhm, I'd like it to be one of these two places. Here
|
|
|
Post by Wormopolis on Jul 6, 2010 7:36:22 GMT -8
ok, you are going to poop nickles when you see this. it currently stores in the custom title, so wherever you have custom title going will be EASY to make it show up there. in that pic for example, that HERE at the top, is perfect.
Since I didnt hear back right away, I wrote the code to actually let you select MULTIPLE things. so now if you want to have a second group title, AND a second group picture thing show up, then it can. as well as a third, a fourth, etc...
th only thing that will be complicated, is if you want to later add new things into the drop down. you cant add into the middle of the array because each profile expects the array to look a certain way. think of it as a snapshot. each profile gets a snapshot of what items in the array to insert. if you change the array around, the code will get confused and put in things thatshouldnt be there. new items will have to be added to the array either at the end or the beginning.. I havetn worked out how I can make it the easiest.
if you want the code as it currently is, I can PM it to you.
|
|
Rhune
Not New Member
[Sj1:0]
Posts: 11
Rhune said 0 great things
|
Post by Rhune on Jul 6, 2010 15:14:16 GMT -8
Yes please <3
|
|
|
Post by Wormopolis on Jul 7, 2010 16:25:37 GMT -8
Glad you like it!
|
|