TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 365
  • Total: 365

[Block] Clan war points block : need idea's/help

Started by Heero, June 24, 2008, 05:01:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Heero

Let me ask you this, what is the most easiest way for you?
I don't want to bother you that much with this request ;) .

JPDeni

It's easiest for me to have you tell me what you want. :)

It's easiest for both of us if the data is entered into posts and not in a form. But I really need to know what fields you want before I can know for certain. You can have as many fields as you need, but you have to tell me what they are going to be up front.

At present, you need

Game (which will have an image connected with it)
Score
Enemy clan (which will have an image connected with it)

You don't need to enter your own clan name every time, since it will be the same every time. What else do you need to display?

Heero

Well..  I guess you know somehow what I want to have.
As the fields I guess you want to know the input, right?

And so on front page present :
, or anything what makes it easy for u to create.

p.s. It could be I misunderstood your question. I'm sorry for that.

JPDeni

Earlier you said:
Quotesigh hmm, isn't it possible showing the first 5 lines of a topic?

I took that to mean you needed another field. But you didn't add a field. You still have your original 4. This is why I'm confused.

Unless you think that "the first 4 lines of a topic" means that it would only show four of your war thingies. Let me see if I can explain it again.

You create a board that only certain members can see -- whoever you want to be able to add, modify and delete the information. You create a topic in the board. You put the following in the first post:

------------------------------------------------------
Warcraft 3
Clan Tern
4:1
Clan Yui
------------------------------------------------------

That's it. Just the things between the lines up there are in that first post. Then you have another war thingy and you post those results by adding another post to the topic:

------------------------------------------------------
Warcraft 3
Clan Tern
3:2
Clan On
------------------------------------------------------

Then you have another war. You post those results in another post:

------------------------------------------------------
Warcraft 3
Clan Tern
2:2
Clan Pol
------------------------------------------------------

You continue that way. Each time you have a war you add a post to that topic in that hidden board with the information about the results of the war, always exactly in that order:

Game
Your clan
Results
Enemy clan

The names of the graphic files you want to use should be

For the games -- the name of the game in lower case with the spaces removed and add the file extension -- Warcraft 3 becomes warcraft3.jpg

For the clans -- the name of the clan in lower case with the spaces removed and add the file extension -- Clan Tern becomes clantern.jpg

The only thing you have to worry about is getting the names of the files right and tell me what folder they're going to be in. The code in the block will take care of the rest.

I write code for a block that reads the 5 most recent posts in that hidden board. The code then translates each line into a name of a graphic file which you have added and have in a specific folder on your site. It prints out the graphic files, the clan names and the results in a table, just like you made as an example

The reason that I'm wanting to use a forum post is that it means I don't have to write code for editing and deleting the information. Adding stuff is real easy to write code for. When I have to add the functions of editing and deleting, it's a whole 'nother ball game. I can do it, but it's just as easy for you to put it into posts as it is for you to put it into a form.

Does this make more sense?

Heero

Well it does ...
Sorry for misunderstanding and thanks for your patience lol.

The folder could be just named clanwarimg. Not that the name actually matters that much for me ;) .
For the images, I can add more later on, right? ( note that I have enough knowledge to edit some php )

And if I'm correct by understanding, it would be like this to post :

warcraft3.jpg ( - > This reveals an image if it is correctly spelled )
flageurope.jpg Clan x2o ( -> This reveals one image, and the text )
1 - 3 ( -> This reveals the score of the clanwar )
flagrussia.jpg Clan Test ( This reveals one image again, and the text )

And on the frontpage it would show the 5 latest wars.

Are we following both the right line now?
Thanks in advance,
Xarwin :)

JPDeni

QuoteFor the images, I can add more later on, right?
All you have to do is to stick them in the folder, following the naming pattern of making it all lower-case and taking out the spaces. The script will take care of everything else.

QuoteAnd if I'm correct by understanding, it would be like this to post :

Well, you can do that, but it will make life more difficult for you. I'm trying to make it easier.

Rename flageurope.jpg to clanx2o.jpg
Rename flagrussia.jpg to clantest.jpg

Then all you have to do is enter the data like this:

Warcraft 3
Clan x2o
1 - 3
Clan Test

and the script will take it from there.

Something just occurred to me. Does each clan have its own flag or can several clans share a flag?

Heero

Heh thanks ..

Well about the flags, it can be any flag since each clan can be from a different country.
It's okay if I can manuel add more codes & images to display other flags :)

JPDeni

Quoteeach clan can be from a different country.

Can two clans be from the same country? This is a very important question and the whole code depends on the answer. Is it possible that two clans could use the same flag graphic?

Heero

Yes, that's possible. It might be that both clans are using the same flags.

barpoet

Where is this code? I'm just curious cause this could be a useful code for Clan forums. ;D

This website is proudly hosted on Crocweb Cloud Website Hosting.