Raised This Month: $32 Target: $400
 8% 

[CS:GO] Web Shortcuts CS:GO version [Updated 11-May-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
johanman123
Junior Member
Join Date: Feb 2015
Old 02-27-2015 , 11:28   Re: [CS:GO] Web Shortcuts CS:GO version v2.2
Reply With Quote #101

How do i make http://dendanskebanan.nerocms.dk/custom.php?id=3 open when i type !regler?
johanman123 is offline
virusking
AlliedModders Donor
Join Date: Jul 2014
Location: Helsinki
Old 02-27-2015 , 11:43   Re: [CS:GO] Web Shortcuts CS:GO version v2.2
Reply With Quote #102

Quote:
Originally Posted by johanman123 View Post
How do i make http://dendanskebanan.nerocms.dk/custom.php?id=3 open when i type !regler?
"!regler" "height=720,width=1024" http://dendanskebanan.nerocms.dk/custom.php?id=3

Quote:
Originally Posted by Kruzi View Post
How to close full window?
!stopmotd not worked
You need to press the X, which in fullscreen is at the top right corner behind the motd. Just click there. Or set up your motd to something smaller instead of fullscreen like: height=720,width=1024

Quote:
Originally Posted by johanman123 View Post
Ok so how do i add for example !rules to open my website?
"!rules" "height=720,width=1024" yourwebsite.com

Last edited by virusking; 02-27-2015 at 11:48.
virusking is offline
johanman123
Junior Member
Join Date: Feb 2015
Old 02-27-2015 , 13:39   Re: [CS:GO] Web Shortcuts CS:GO version v2.2
Reply With Quote #103

Quote:
Originally Posted by virusking View Post
"!regler" "height=720,width=1024" http://dendanskebanan.nerocms.dk/custom.php?id=3


You need to press the X, which in fullscreen is at the top right corner behind the motd. Just click there. Or set up your motd to something smaller instead of fullscreen like: height=720,width=1024



"!rules" "height=720,width=1024" yourwebsite.com
!regler doesnt work
johanman123 is offline
ph
AlliedModders Donor
Join Date: Mar 2006
Old 02-28-2015 , 07:57   Re: [CS:GO] Web Shortcuts CS:GO version v2.2
Reply With Quote #104

Why do I get this message?

12:56:22 [SM] Plugin webshortcuts_csgo.smx failed to load: Native "KeyValues.KeyValues" was not found.


EDIT (FIX FOUND)

Web Shortcuts CSGO version v2.2 (SM 1.6 compatibility) by Franc1sco franug.zip
https://forums.alliedmods.net/showpo...8&postcount=96
__________________

Last edited by ph; 02-28-2015 at 08:07.
ph is offline
Ms. Trooper
Senior Member
Join Date: Nov 2012
Old 03-16-2015 , 23:08   Re: [CS:GO] Web Shortcuts CS:GO version v2.2
Reply With Quote #105

It works for most users, but not all. Is it known why? Are those clients missing something?

Also, would it be possible to make it so that you can still move around wile it's open? What about changing the start position of the window?
Ms. Trooper is offline
Azerja12
Senior Member
Join Date: Feb 2013
Location: EU
Old 03-18-2015 , 11:34   Re: [CS:GO] Web Shortcuts CS:GO version v2.2
Reply With Quote #106

Quote:
Originally Posted by ph View Post
Why do I get this message?

12:56:22 [SM] Plugin webshortcuts_csgo.smx failed to load: Native "KeyValues.KeyValues" was not found.


EDIT (FIX FOUND)

Web Shortcuts CSGO version v2.2 (SM 1.6 compatibility) by Franc1sco franug.zip
https://forums.alliedmods.net/showpo...8&postcount=96
Quote:
Originally Posted by Ms. Trooper View Post
It works for most users, but not all. Is it known why? Are those clients missing something?

Also, would it be possible to make it so that you can still move around wile it's open? What about changing the start position of the window?
Same problem. Are you aware?
__________________
Azerja12 is offline
Gargos
Junior Member
Join Date: Jul 2014
Location: Australia
Old 03-19-2015 , 21:22   Re: [CS:GO] Web Shortcuts CS:GO version v2.2
Reply With Quote #107

Hi,

Do you know what this error is related to and how I can stop it from happening?


From addons/sourcemod/logs

L 03/19/2015 - 00:09:52: [SM] Plugin encountered error 15: Array index is out of bounds
L 03/19/2015 - 00:09:52: [SM] Displaying call stack trace for plugin "webshortcuts_csgo.smx":
L 03/19/2015 - 00:09:52: [SM] [0] Line 62, webshortcuts_csgo.sp::OnSay()


Thanks.
Gargos is offline
ImACow
AlliedModders Donor
Join Date: Feb 2015
Old 03-21-2015 , 11:43   Re: [CS:GO] Web Shortcuts CS:GO version v2.2
Reply With Quote #108

Made a php script if you want to do the redirects yourself.
PHP Code:
<html>
    <head>
        <title>Redirect</title>
    </head>
        <?php
        $target 
="";
        
$options "";
        if (empty(
$_GET['target_url'])) {
            echo 
'<p>Error: please supply a valid target_url</p>';
            exit();
        }
        else
        {
            
$target $_GET["target_url"];
        }
        if (empty(
$_GET['target_options'])) {
               
//echo '<p>Error: please supply a valid target_options</p>';
               //exit();
        
}
        else
        {
            
$options $_GET["target_options"];
        }
        
        
        echo 
"<p>redirecting to '"$target "'<p>";
        echo 
"<p>with options '"$options "'<p>";

        
?>
        <script type="text/javascript">
             window.open("<?php echo $target?>","<?php echo $target?>","<?php echo $options?>");
        </script>
    </body>
</html>
Won't work out of the box, Ive modified the sp file & compiled differently. but if you want to get it working you will figure it out.

So first register a command.
PHP Code:
RegConsoleCmd("sm_rules"Command_GetPage ,"sm_rules check server rules");
RegConsoleCmd("sm_rules_withsize"Command_GetPage ,"sm_rules_withsize check server rules"); 
This calls this code:
PHP Code:
public Action:Command_GetPage(client,args)
{
    
decl String:CommandName[50];
    
GetCmdArg(0CommandNamesizeof(CommandName));
    
decl String:url[512];
    if(
StrEqual(CommandName,"sm_rules"))
    {
        
url "https://yoursite.com/rules";
        
FixMotdCSGO(url,"");
    }
    if(
StrEqual(CommandName,"sm_rules_withsize"))
    {
        
url "https://yoursite.com/rules";
        
FixMotdCSGO(url,"height=50,width=50");
    }
        if(
StrContains(url"https://"false) == -1)
    {
        
Format(urlsizeof(url), "https://%s"url);
    }
    
    
PrintToConsole(client,url);
    
ShowMOTDPanel(client"Web Shortcuts"urlMOTDPANEL_TYPE_URL);


FixMotdCSGO:

PHP Code:
stock FixMotdCSGO(String:web[512],String:options[512])
{
    
Format(websizeof(web), "https://yoursite.com/above_php_script.php?target_options=%s&target_url=%s",optionsweb);

http://www.w3schools.com/jsref/met_win_open.asp <--- any of the parameters of specs can be set and will be given to the window opening.

so you want 50x50px ?
change the FixMotdCSGO() with the parameters you want
PHP Code:
FixMotdCSGO(url,"height=50,width=50"); 
To franug: I find it stupid that you are not providing the php script & explain how to set up your own redirect.

Last edited by ImACow; 03-21-2015 at 18:38.
ImACow is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 03-23-2015 , 05:31   Re: [CS:GO] Web Shortcuts CS:GO version v2.2
Reply With Quote #109

Quote:
Originally Posted by Ms. Trooper View Post
It works for most users, but not all. Is it known why? Are those clients missing something?
Maybe they dont have cl_disablehtmlmotd 0

Quote:
Originally Posted by Ms. Trooper View Post
Also, would it be possible to make it so that you can still move around wile it's open? What about changing the start position of the window?
Is possible. Windows.open have parameters to control it

You can try:
Code:
// control windows appearance
"google" "toolbar=yes, scrollbars=yes, resizable=yes, top=500, left=500, width=400, height=400" http://www.google.com
My plugin interpret the second value in the txt file like the "specs" value in windows.open
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 03-23-2015 at 06:07.
Franc1sco is offline
Send a message via MSN to Franc1sco
Bara
AlliedModders Donor
Join Date: Apr 2012
Location: Germany
Old 03-28-2015 , 09:42   Re: [CS:GO] Web Shortcuts CS:GO version v2.2
Reply With Quote #110

Sorry for this post but...

---

Quote:
ShowMOTDPanel( client, "Script by Franc1sco franug", text, MOTDPANEL_TYPE_URL );
Quote:
Format(web, sizeof(web), "http://www.cola-team.com/franug/webshortcuts2.php?web=%s;franug_is_pro;%s", title,web);
Quote:
author = "Franc1sco franug and James \"sslice\" Gray",
---

Why now over external php script? Cola-Team is not trustable.

---

Looks serious.
__________________
Discord (Bara#5006) | My Plugins (GitHub)
You like my work? Support is not a crime.
Bara is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:33.


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