AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Web Shortcuts (Redux) (https://forums.alliedmods.net/showthread.php?t=173334)

KyleS 12-03-2011 21:13

[ANY] Web Shortcuts (Redux)
 
1 Attachment(s)
I'm perfectly happy with the existing Web Shortcuts, this is useless! :twisted:

Sounds like you've been lucky. Anyways, there are a lot more replacements in this. As well to this, in theory, it should be faster.

Cool! I'll just throw my old file in there and load this!

Whoa stop right there! The format has changed significantly! See the second post for examples.

What kind of keywords can I use for specifying options for each chat hook?

Good question! Here's a list of the current ones
Quote:

Big
Hook
Pointer
Silent
Title
Url


Big doesn't work for me. How come?!

Big, as far as I know, works in TF2 only. So it's been masked to only function in TF2 and not do anything otherwise.

With the old Webshortcuts if I typed GoOGlE when I specified google in the file it would still work. Why doesn't it work with this?!

Well, Tries don't work that way sadly. Instead of taking the 'slow' route, comparing each string at a time. I figured ease of use and storage for new features would trump that.

When using Pointer I specify it last and the hook doesn't work, what's going on?

See the second post for examples. This usage is invalid as you cannot join tries, sadly. Pointer can however allow you to change data in another block. At the moment this shouldn't really be used.

I've found an error.

Oh boy, that's not good at all! Be sure to post it in the thread and to include the relevant blocks/sections so we can figure out what's going on. This alone shouldn't error out, so without provided sections, who knows what's going on!

I want to request a feature!

See I've found an error, same sort of concept. Use blocks to show what you mean so I can get the implementation right.

Credits
  • Psychonic -Using his replacements from Dynamic MOTD.

Current: 132 views

KyleS 12-03-2011 21:13

Re: [ANY] Web Shortcuts (Redux)
 
Reserved for documentation

Each section name works as a hook. So if you have a section that looks like the following:
PHP Code:

"rules"
{
    
"Url" "http://websitehere.com/rules/"
    "Title" "Rules and Regulations"


If you typed 'rules' in chat, the Url, along with the Title would be displayed to the client using a VGUI panel.

Now this is where things can get complicated, you can have the following
PHP Code:

"rules"
{
    
"Title"        "{NAME}"
    "Silent"    "Nope"
    "Url"        "http://SiteHere.com/index.php?id={FRIEND_ID}&Pickles={CURPLAYERS}"
}

"Rules2"
{
    
"Pointer"    "rules"
    "Title"     "{NAME}|{STEAM_ID}"
    "URL"        "http://SiteHerev2.com/index.php?IP={IP_ADDRESS}"
    "Big"        "Sure"


Rules2 overwrites rules with it's information and adds a hook named Rules2. rules has a Silent field though, this field remains untouched in the above example with a valid value of "Nope". The two functioning chat hooks calling this same block are rules and Rules2. At the moment, there's no real purpose to do this. Just modify the rules block and add a rules hook (explained below), you should be solid.

Here's a simple example of what you can do:
PHP Code:

"rules"
{
    
"Url" "http://websitehere.com/rules/"
    "Title" "Rules and Regulations"
    "Hook" "!rules"
    "Hook" "/rules"
}

"rulez"
{
    
"Pointer"    "rules"
    "Url"        "http://ADifferentWebsiteHere.com/Rules/
    "
Title"        "Different Title"
}

"
#RespectMahAuthoritahh"
{
    
"Silent"     "Yes"
    "Url"        "http://www.youtube.com/watch?v=D81vBcKfqpo"
}

"Authoriteh"
{
    
"Big"        "Yup"
    "Silent"    "Nope"
    "Url"        "http://www.youtube.com/watch?v=QDd07jhGcL0"
}

"%LoseIt"
{
    
"Big"        "Yup"
    "Title"        "Potato"
    "Url"        "http://www.youtube.com/watch?v=jI8gEU8-i8A"
    "Hook"        "LoseIt"
}

"GameMonitor"
{
    
"Title"        "Game Monitor Stats for {SERVER_NAME}"
    "Url"        "http://www.game-monitor.com/GameServer/{SERVER_IP}:{SERVER_PORT}/"
    "Big"        "Sure"
}

"!GameMonitor"
{
    
"Pointer"    "GameMonitor"
    "Hook"        "!Meh"
    "Hook"        "!Eggs"


In this block, we introduce the Hook key. When someone types !Meh, or !Eggs in chat, they're pointed to the GameMonitor block from the Pointer. Again, at this time, using a Pointer in the same file is just wrong. As well to this, Pointing to yourself is a syntax violation, it's unknown what will happen at this time.

You're more then welcome to not define keys, as a matter of fact, I suggest doing so. Nothing is required except for a URL and a Section name. Don't break the syntax!

Anything starting with a 1, y, Y, T, t, s, S means the key is true.
Anything starting with a 0, n, N, f, F means the key is false.

mrzor 12-25-2011 14:27

Re: [ANY] Web Shortcuts (Redux)
 
Hi !

I've been using this plugin for a week and it is working like a charm - I tried to avoid using the advanced hook/pointer features so far, and am only using simple statements such as

Quote:

"news"
{
"Url" "http://tf2.zorcellerie.fr"
"Title" "Le Web"
"Hook" "!news"
"Hook" "/news"
}
I've noticed that when someone types "!news" it is swallowed by the plugin - nobody sees that this link is being opened. I would like this behavior to be customizable, that is, display that someone typed !something if set up that way.

Cheers !

daleGEND 12-25-2011 14:43

Re: [ANY] Web Shortcuts (Redux)
 
mySQL is a must for this. I am considering working with my developer to make a general UI integration for a lot of plugins that combines with XenForo. Will let you guys know the outcome.

poppin-fresh 12-28-2011 20:58

Re: [ANY] Web Shortcuts (Redux)
 
Is it just me or does the plugin not generate the WebShortcuts.txt? nonetheless, great plugin!

KyleS 12-28-2011 20:59

Re: [ANY] Web Shortcuts (Redux)
 
The plugin doesn't generate any files.

kradalby 01-03-2012 06:35

Re: [ANY] Web Shortcuts (Redux)
 
I cant seem to figure out what to name the config file or where to put it?

i am a noob:P but i didnt think i was blind to:P

Snaggle 01-03-2012 07:00

Re: [ANY] Web Shortcuts (Redux)
 
Quote:

Originally Posted by kradalby (Post 1624350)
I cant seem to figure out what to name the config file or where to put it?

i am a noob:P but i didnt think i was blind to:P

Code:

configs/Webshortcuts.txt

kradalby 01-03-2012 07:39

Re: [ANY] Web Shortcuts (Redux)
 
Thanks dude, i swear i tried all combination of .cfg and .txt with or without capital letters except that one:P

does anyone know if i can use links with html anchor? it workd for my motd but at first glance it does not look like it here.

untamed0 01-07-2012 09:26

Re: [ANY] Web Shortcuts (Redux)
 
Works great :D, I have a suggestion, would it be possible to have a 'msg' option, which is printed to the user when they run the hook? This would be useful for Silent blocks.

For example:

Code:

"radio"
{
    "Silent"    "Yes"
    "Url"    "http://websitehere.com/radio"
    "Hook"    "!radio"
    "Msg"    "You're now listening to the radio! say !stop to stop listening"
}


Skyrider 01-08-2012 08:52

Re: [ANY] Web Shortcuts (Redux)
 
I'm seeing that the SteamREP plugin:

http://forums.alliedmods.net/showthread.php?p=1514234

Is using full sized screens when using a command. Is there anyway the same can be done with this plugin rather showing a small sized motd page?

untamed0 01-08-2012 10:07

Re: [ANY] Web Shortcuts (Redux)
 
Quote:

Originally Posted by Skyrider (Post 1627923)
I'm seeing that the SteamREP plugin:

http://forums.alliedmods.net/showthread.php?p=1514234

Is using full sized screens when using a command. Is there anyway the same can be done with this plugin rather showing a small sized motd page?

I think it already has it, unless I misunderstood the documentation, the 'Big' setting does this (untested, don't have a TF2 server.

Skyrider 01-08-2012 11:19

Re: [ANY] Web Shortcuts (Redux)
 
Quote:

Originally Posted by untamed0 (Post 1627960)
I think it already has it, unless I misunderstood the documentation, the 'Big' setting does this (untested, don't have a TF2 server.

Ahhh, I actually never used/tested this before.. I actually never knew this was possible. I thank thee, and I shall try them ;).

EDIT:
I can't get the BIG to work. All the new hooks work with a plugin reload, but do I need a map / server restart for the big to work?

EDIT 2:
I even did a server restart, the big doesn't work. Not even with your examples.

Changing

Quote:

change if (bBig)
{
KvSetNum(hKv, "customsvr", 1);
}
to

Quote:

KvSetNum(hKv, "customsvr", 1);
Will work, but it changes all the motd to "big". The big hook is broken I'm afraid.

S_W_A_T 01-19-2012 05:41

Re: [ANY] Web Shortcuts (Redux)
 
It'd be nice if the command is printed on the chat as well whenever a player execute it. And how can i set !rules to open the motd page?... TIA.

mal415 01-30-2012 19:45

Re: [ANY] Web Shortcuts (Redux)
 
How come when I type one of the hooks I just get a blank blackboard? Am I missing something?

Datenkralle 02-16-2012 21:11

Re: [ANY] Web Shortcuts (Redux)
 
It's possible to link a tf2items backpack for example?
So when someone target a player via mouse cross and type a command in chat. Can he see the backpack from the target?

Ok i know the backpack plugin, but i will use also some other linked websites with steamid variable and so on.

11530 03-29-2012 15:21

Re: [ANY] Web Shortcuts (Redux)
 
I may not be thinking straight, but isn't the second expression moot since the string "tf_beta" will have strncmp(sGameDir, "tf", 2, false) == 0 too?

Code:

(!strncmp(sGameDir, "tf", 2, false) || !strncmp(sGameDir, "tf_beta", 7, false))

minimoney1 03-29-2012 16:54

Re: [ANY] Web Shortcuts (Redux)
 
You make a new file named "WebShortcuts.txt" (With no quotes) in your configs folder and put your settings in there.
BuildPath basically generates the full directory path.
For example it turns "configs/WebShortcuts.txt" into a usable directory string (Something like "addons/sourcemod/configs/WebShortcuts.txt", but I'm not sure)

DeathMaster 05-04-2012 00:11

Re: [ANY] Web Shortcuts (Redux)
 
There is an issue that when you get killed the page your looking at refreshes and its really quite annoying.
I did find this on another post so maybe that will help you fix the problem.

http://forums.alliedmods.net/showpos...7&postcount=49

Green Giant 06-20-2012 13:57

Re: [ANY] Web Shortcuts (Redux)
 
-snip nevermind-

Awesome plugin you got there, it works like a charm for my server.

kennyist 06-29-2012 07:57

Re: [ANY] Web Shortcuts (Redux)
 
Just started using this, It loads the page fine but about 2 seconds later it crashes client side (everyone who has tried).

daleGEND 08-09-2012 06:43

Re: [ANY] Web Shortcuts (Redux)
 
NVM: Figured out my issue, don't call your file WebShortcuts.txt, it must be Webshortcuts.txt

ownicusprime 08-17-2012 16:58

Re: [ANY] Web Shortcuts (Redux)
 
Could someone update this to support CS:GO? I installed it on my CS:GO server and it doesn't appear to work.

Anyone else tried testing it with GO to confirm if it does or does not work?

KyleS 08-17-2012 23:32

Re: [ANY] Web Shortcuts (Redux)
 
Quote:

Originally Posted by ownicusprime (Post 1774425)
Could someone update this to support CS:GO? I installed it on my CS:GO server and it doesn't appear to work.

Anyone else tried testing it with GO to confirm if it does or does not work?

I'm waiting for the MOTD implementation to be finalized before even attempting to ensure this works. The MOTD was just added last update.

dagg929 08-19-2012 00:09

Re: [ANY] Web Shortcuts (Redux)
 
Love the features, really looking forward to being able to roll this out in CS:GO.

BrainInBlack 08-25-2012 09:30

Re: [ANY] Web Shortcuts (Redux)
 
Hi there, maybe i'm doing something wrong, but {TARGET_FRIEND_ID} (you can select a player from the list) doesn't work, or isn't implemented yet. This makes the PlugIn almost useless for us, because we use the "old" plugin for backpack and inventory inspection, and some other stuff.

If you add/fix this, than this will certainly be the superior plugin to the "old" one :D


PS: Would be nice if you can add POST as method as well, GET is kinda un-secure ;)

peewee41 08-28-2012 23:49

Re: [ANY] Web Shortcuts (Redux)
 
How's the update going for CS:GO?

Gonz 09-01-2012 18:00

Re: [ANY] Web Shortcuts (Redux)
 
this plugin for cs:go would be great!!!

pedroza26 09-02-2012 16:29

Re: [ANY] Web Shortcuts (Redux)
 
Quote:

Originally Posted by peewee41 (Post 1785735)
How's the update going for CS:GO?

bump

KyleS 09-02-2012 16:30

Re: [ANY] Web Shortcuts (Redux)
 
Quote:

Originally Posted by pedroza26 (Post 1789883)
bump

Quote:

Originally Posted by KyleS (Post 1774796)
I'm waiting for the MOTD implementation to be finalized before even attempting to ensure this works. The MOTD was just added last update.


Inflikted 09-09-2012 15:57

Re: [ANY] Web Shortcuts (Redux)
 
Is it possible to build in basic search. So if someone types in

!search something

it would lead to http://www.asite.com/index.php?q=something

I read over the tutorial and I couldn't figure out whether this is currently possible in the scope of this plugin.

KyleS 09-09-2012 16:01

Re: [ANY] Web Shortcuts (Redux)
 
Quote:

Originally Posted by Inflikted (Post 1795467)
Is it possible to build in basic search. So if someone types in

!search something

it would lead to http://www.asite.com/index.php?q=something

I read over the tutorial and I couldn't figure out whether this is currently possible in the scope of this plugin.

Yes this can be added.

Inflikted 09-10-2012 10:47

Re: [ANY] Web Shortcuts (Redux)
 
I may have misunderstood, this can be currently added in with the plugin already?
If so how would I go about doing this, I couldn't figure it out from the syntax guideline available in the 2nd post.

Or the feature can be added into the plugin and is currently not possible?

KyleS 09-10-2012 11:04

Re: [ANY] Web Shortcuts (Redux)
 
Quote:

Originally Posted by Inflikted (Post 1796007)
I may have misunderstood, this can be currently added in with the plugin already?
If so how would I go about doing this, I couldn't figure it out from the syntax guideline available in the 2nd post.

Or the feature can be added into the plugin and is currently not possible?

This is not currently possible. However, it can be added.

scorpadorp 09-29-2012 11:52

Re: [ANY] Web Shortcuts (Redux)
 
When you decide to update, I thin kit would be great if it showed the client actually typing the command instead of blocking it completely so no one else sees the message.

Roundcat 10-06-2012 17:56

Re: [ANY] Web Shortcuts (Redux)
 
Heres a question - I'd like to have a link to each players own stats page on gameme.

For example mine is: http://cw008150.gameme.com/playerinfo/2

Is there a code I can add that gameme will understand - ie something like:

http://cw008150.gameme.com/playerinfo/{player_ID}

Mysteria 11-01-2012 08:41

Re: [ANY] Web Shortcuts (Redux)
 
Any progress with CSGO update this plugin? I am waiting so long for this.

KyleS 11-01-2012 11:35

Re: [ANY] Web Shortcuts (Redux)
 
Quote:

Originally Posted by Mysteria (Post 1830308)
Any progress with CSGO update this plugin? I am waiting so long for this.

A ton of typically standard game features are not functional under CS:GO. While it appears to me that this is intended, I'll take a look this weekend. Do you know anyone that actually has this working besides ESEA?

maxolahird 12-18-2012 00:47

Re: [ANY] Web Shortcuts (Redux)
 
hey, could someone please help me? Some players only see a black screen when the "motd" is open... some see the website but some don't.. how can I fix this ? I use it to show rules so I really need it to work for everyone

Smffy 12-20-2012 06:24

Re: [ANY] Web Shortcuts (Redux)
 
Quote:

Originally Posted by maxolahird (Post 1855722)
hey, could someone please help me? Some players only see a black screen when the "motd" is open... some see the website but some don't.. how can I fix this ? I use it to show rules so I really need it to work for everyone

Would imagine those people have the box in settings/multiplayer/advanced checked that says 'Disable HTML MOTD's'

Not 100% but I think thats the default, needless to say theres nothing you can do about that.


All times are GMT -4. The time now is 11:27.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.