SMF For Free Support Forum
Signup For Free Forum
September 06, 2008, 12:08:20 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: 1 [2]
  Print  
Author Topic: Adding in SMF codes  (Read 702 times)
0 Members and 1 Guest are viewing this topic.
Greg
SMF For Free Newbie
*
Offline Offline

Posts: 11


View Profile
« Reply #15 on: May 08, 2008, 12:34:03 pm »

I found the code Omikron mentioned.   I do not know but maybe you could utilize that

http://www.smfsupport.com/support/smf_for_free_codes/code_custom_bbc-t9467.0.html

thanks. will have a look Tongue
Logged
Greg
SMF For Free Newbie
*
Offline Offline

Posts: 11


View Profile
« Reply #16 on: May 08, 2008, 12:48:33 pm »

Code:
<script>
// Created by Omikron 9861 of Aetus Designs (aetus.net)
function custombbc(BBC,HTML,CLOSING_BBC,CLOSING_HTML){var b=document.getElementsByTagName("div");for(x=0;x<b.length;x++){if(b[x].className=="post"&&b[x].innerHTML.match(BBC+"(.*)+"+CLOSING_BBC)){b[x].innerHTML=b[x].innerHTML.split(BBC+RegExp.$1+CLOSING_BBC).join(HTML+RegExp.$1+CLOSING_HTML);}}}
custom_bbc('[bbc]','html','[/bbc]','close html');
</script>

To add more BBC, at the end add more lines like the one above. For example, if I wanted a [bold] BBC, I'd put
Code:
custom_bbc('[bold]','<b>','[/bold]','</b>');

Just before the </script> line.

This is like v1 except for the fact that, thanks to slayer, there is no more limitation of being able to use only one per post.

With this code, would i be able to host the file somewhere else and pull the info out of the file i would need to upload?

For eg:

In the data file it has the vilage ID, and the x|y . so if i gave the script here the x|y of the village it should be able to pull up the id and the name?
Logged
Celebrus
SMF For Free Hero
*
Offline Offline

Posts: 757


Previously known as Omikron


View Profile WWW
« Reply #17 on: May 08, 2008, 12:50:27 pm »

You should be able to do that. It won't be very hard, but you'd need to give me all the data about the village ids and the x|y. You could post it here or send it to me in a PM. Either way, I'll try to do it tomorrow.
Logged

Greg
SMF For Free Newbie
*
Offline Offline

Posts: 11


View Profile
« Reply #18 on: May 08, 2008, 01:04:45 pm »

You should be able to do that. It won't be very hard, but you'd need to give me all the data about the village ids and the x|y. You could post it here or send it to me in a PM. Either way, I'll try to do it tomorrow.

Thanks mate. Im going to download the file and have a look at it. I'll also get a few examples and mail them to you to have a look at once iv figured it out.

Its great having people that are so helpful. wish i had found you guys earlier.
Logged
Greg
SMF For Free Newbie
*
Offline Offline

Posts: 11


View Profile
« Reply #19 on: May 08, 2008, 02:05:38 pm »

1,136.+BB-Codes+are+for+losers.,460,467,753681,10696,0
2,36+Terra+-+Ok,480,466,413179,9695,0
3,EVARIC+58,506,482,796035,11879,0
581,N+G+Cs+village+114,548,475,558565,10491,0
4,%5B01%5D,447,562,667137,9936,0
5,Whack+Attack+71,458,468,835607,9874,0
6,Noviomagus,538,493,627423,10220,0
7,SSMF%3A,520,440,674151,9672,0

This is whats in the data file.  well a ton more, roughly a million lines i think.

World data

To create external statistics, we provide the most important world data for download. The attributes of the villages, tribes and players are offered for download regularly. Now we also provide data about all village takeovers since the start of the world with Unix timestamp and the content of profiles.

Please load the world statistics only as often as you really need to. Scripts which load the statistics more than once per hour in regular operation are not allowed. In this case try to cache the data to an external webserver. The world statistics are updated at regular intervals, which depend on the particular server.

The files are also available compressed as .txt.gz files. If possible, please do use these files.

There are 5 files available for download. Each file consists of an arbitrary number of lines separated by commas. The individual data are coded with the PHP function urlencode(), which means for example that a comma is represented by %2C.
/map/village.txt - /map/village.txt.gz

This file contains information about the villages. The data are available in the following order:
$id, $name, $x, $y, $tribe, $points, $rank



I really hope this is enough data for you. I know its tough working with what info i give you since i dont really know much. But i hope this makes sense. It does not make sense to me, the figures dont really match up. :/ well atleast to me
« Last Edit: May 08, 2008, 02:30:27 pm by Greg » Logged


Pages: 1 [2]
  Print  
 
Jump to:  

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.377 seconds with 18 queries.