[QUOTE=andreblue;49435747][code]
<?php
$file = file_get_contents("http://steamcommunity.com/sharedfiles/filedetails/?id=563033331");
$muster = '<a href="http:\/\/steamcommunity.com\/sharedfiles\/filedetails\/\?id=([0-9]+)">';
preg_match_all($muster, $file, $match);
$arr = array_unique(array_values($match[1]));
sort($arr);
foreach($arr as $val) {
print $val . "<br/>";
}
?>
[/code]
It prints out the list of items, that way if someone wants the expression they can use it.[/QUOTE]
I will create one and post a link shortly. Since his is down.
[QUOTE=Segecos;49436433]I will create one and post a link shortly. Since his is down.[/QUOTE]
Ya, i just remembered, if you use that code, make sure you check the array for the ID of the collection, it adds its self to the list... woops
[QUOTE=andreblue;49437639]Ya, i just remembered, if you use that code, make sure you check the array for the ID of the collection, it adds its self to the list... woops[/QUOTE]
Got it ;)
[B]EDIT: Added it so everyone can use it!, Added a interface and change it so it would get from the index. [URL="segeco.me/WS/"]segeco.me/WS/[/URL]
SOON: Im going to add the Addon Name next to it.[/B]
I always used a serverside lua for this proess.
Something like this:
[CODE]for i,addon ipairs(engine.GetAddons()) do
print("Adding Workshop Addons:")
if addon.mounted then
resource.AddWorkshop( addon.wsid )
print("\t[+]"..addon.wsid..": "..addon.title)
end
end[/CODE]
All your methods have a big-ish drawback:
You are forcing people to download lua-only addons that they do not need to download.
This doesn't really have any extreme obvious drawbacks, but it does shit up their Garry's Mod installation with unnecessary files.
[QUOTE=Segecos;49438930]Got it ;)
[B]EDIT: Added it so everyone can use it!, Added a interface and change it so it would get from the index. [URL="segeco.me/WS/"]segeco.me/WS/[/URL]
SOON: Im going to add the Addon Name next to it.[/B][/QUOTE]
You may want to do some error checking if the addon is valid...
[url]https://gist.github.com/andreblue/d2e1107e8a448506b97a[/url] is one i have and if you check where i check WSID then you see how i check if it is valid.
[QUOTE=andreblue;49443237]You may want to do some error checking if the addon is valid...
[url]https://gist.github.com/andreblue/d2e1107e8a448506b97a[/url] is one i have and if you check where i check WSID then you see how i check if it is valid.[/QUOTE]
Can i use it :D?
You should make it add a -- comment with the name of the addon so server owners can identify what is what.
[QUOTE=Segecos;49446242]Can i use it :D?[/QUOTE]
Go for it, Keep it under the MIT liscence, which i should add to it.
This is based off of a VERY hacky method of doing this..
This is NOT how I would do it nowadays, I came across this old thread and decided to release what I made, however I HIGHLY suggest using ANOTHER resource generator.
[url]https://github.com/biorisk2/Hammerfall-WorkshopDL[/url]
-snip-
You thread bumping cunts
Sorry, you need to Log In to post a reply to this thread.