Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: ^HeRaCLeS^ on October 03, 2011, 02:09:44 PM

Title: Click Right
Post by: ^HeRaCLeS^ on October 03, 2011, 02:09:44 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=3183)

Click Right

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.smfpersonal.net%2FAdkmods%2Flogo.png&hash=b7e60a41a3ada5e2ace731e912eef5f3dd40e770) (http://www.smfpersonal.net/)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.smfpersonal.net%2Ffamfamfam%2Fuser.png&hash=997d251819d42b9aa15fd08d1b64be6544cd071a) Autor/Author:
     ^HeRaCLeS^ (http://www.smfpersonal.net/profiles/heracles-u259.html)
    
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.smfpersonal.net%2Ffamfamfam%2Fpage_white_flash.png&hash=ed86fd5e13fc727a61ef6b0bdbb304d2f610017e) Características:
     Esta aplicación nos permitira poner un menu al boton derecho del mouse.
     Opciones:
          Activar/Desactivar
          Seleccionar menu (Default o Personalizado)
          Si se selecciona el menu personalizado se podran poner hasta 10 botones.
          Se le puede poner sub botones a 5 de los botones.
          Se le puede poner hasta 3 sub botones.
          Se puede poner separadores entre los botones.
          Se puede poner para abrir en la misma ventana o en otra.
                   
                    Opcion de desactivar desde el perfil de usuarios.
     Notas:
          Solo seran visibles los botones que tengan completo el ( Nombre )
          Si no se pone un link se le pondra (#) por defecto.
          Si no se completa ningun campo se vera el avatar, usuario y un mensaje diciendo que no hay opciones.
          Si el usuario no tiene avatar se le pondra la imagen del mod.
          A los visitantes les sale la imagen del mod y las opciones (Ingresar y Registrarse)

     Las opciones de este mod se encuentran en: Centro de Administración » Configuración del Foro » Adk Click Right

     Copyright 2011 by SMF Personal @ visita www.smfpersonal.net (http://www.smfpersonal.net/) para soporte oficial.

     Si tu quieres ayudarnos, por favor visita nuestra seccion de contribuciones: Contribuir (http://www.smfpersonal.net/about.html;sa=contritube-spanish)


(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.smfpersonal.net%2Ffamfamfam%2Fpage_white_flash.png&hash=ed86fd5e13fc727a61ef6b0bdbb304d2f610017e) Features:
     This application will allow us to put a menu in the button right mouse.
     Options:
          Enable/Disable
          Select menu (Default or Custom)
          If you select the customized menu may be placed up to 10 buttons.
          You can put sub buttons, to 5 buttons.
          You can put up to 3 sub buttons.
          You can put spacers between the buttons.
          Can be set to open in the same window or another.

          Option disable from users profile.
     Notes:
          Buttons will be visible only with full ( Name )
          If not using a link will be placed (#) by default.
          Failure to complete any field will see the avatar, user and a message saying that no options.
          If the user has no avatar will put the image of the mod.
          Visitors will go forth the image of the mod and options (Login and Register)

     The options of this mod are in: Administration Center » Configuration » Adk Click Right

     Copyright 2011 by SMF Personal @ visit www.smfpersonal.net (http://www.smfpersonal.net/) for official support.

     If you want help, please visit our contributions section: Contribute (http://www.smfpersonal.net/about.html;sa=contribute)



(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.smfpersonal.net%2FThemes%2Fdefault%2Fimages%2Fpost%2Ftopicsolved.gif&hash=0a84317c3660ec2368b578377e809aed837f467b) Idiomas/Languages:

     o English
     o English-utf8
     o Spanish_es
     o Spanish_es-utf8
     o Spanish_latin
     o Spanish_latin-utf8

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.smfpersonal.net%2FThemes%2Fdefault%2Fimages%2Fpost%2Ftopicsolved.gif&hash=0a84317c3660ec2368b578377e809aed837f467b) Compatibilidad/Compatibility:
     o SMF 2.0 *
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.smfpersonal.net%2FThemes%2Fdefault%2Fimages%2Fpost%2Ftopicsolved.gif&hash=0a84317c3660ec2368b578377e809aed837f467b) Desarrollador/Developer:
     Adk-Team (http://www.smfpersonal.net/)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.smfpersonal.net%2FThemes%2Fdefault%2Fimages%2Fpost%2Ftopicsolved.gif&hash=0a84317c3660ec2368b578377e809aed837f467b) Usando/Using:
     o Jquery (http://jquery.com/)
     o jQuery Context Menu (http://www.dynamicdrive.com/)
Title: Re: Adk Click Right
Post by: kat on October 03, 2011, 04:29:59 PM
Hmmm... I went to install this and, during the test, something weird showed-up.

1.   Replace   ./Themes/Amethyst_StoneCurve/index.template.php   Test failed
2.   Replace   ./Themes/Amethyst_StoneCurve/index.template.php   Test successful

This happened with all themes except the default.

Odd. Either the test fails, or it succeeds. How can it do both?

Naturally, I aborted the install, as I was only going to install it out of curiosity.

I thought it best to  let you know what happened, though, in case it points to a goof, of some sort. :)
Title: Re: Adk Click Right
Post by: Adk-Team on October 03, 2011, 04:47:13 PM
If installation found an error in another theme than the default, the modification to this theme will have to be manually.
Following the steps of parse
Title: Re: Adk Click Right
Post by: kat on October 03, 2011, 04:56:27 PM
Yeah, I know that. I used to be a support team member, don't forget. ;)

But, as the test says "Replace index.template.php", I decided that it had to be wrong.

VERY wrong.

No mod would want to replace that entire file.

At least, if it did, I think I'd probably want to beat the crap out of someone. ;)
Title: Re: Adk Click Right
Post by: Adk-Team on October 04, 2011, 11:53:01 AM
I do not understand.
No need to replace the entire file.
It only makes two changes to the index.template.php the mod.
Title: Re: Adk Click Right
Post by: kat on October 04, 2011, 12:40:50 PM
Well, for most themes, though not the default, I get this:

Execute Modification   ./Themes/metalize/index.template.php   Test failed
1.   Replace   ./Themes/metalize/index.template.php   Test failed
2.   Replace   ./Themes/metalize/index.template.php   Test successful

That doesn't exactly inspire confidence.

Each theme does have an index.template, so...


This is only on my test forum, coz my main one's v1.1.15 and is likely to remain so for, well, ever. ;)

So, it doesn't bother me, if I have this mod, or not.

I'm just reporting what's happening, so that we can, perhaps, help other members, if they get this going-on.
Title: Re: Adk Click Right
Post by: Adk-Team on October 04, 2011, 01:18:45 PM
But I can not design for all existing themes.
If the mod gives failure to install, they must make changes to the parse.

And it is not required to change the entire file, only fails on one of the modifications to the file.

QuoteExecute Modification   ./Themes/metalize/index.template.php   Test failed
1.   Replace   ./Themes/metalize/index.template.php   Test failed
2.   Replace   ./Themes/metalize/index.template.php   Test successful

As there tells you, the fault is only on the first modification of the file.
Search:


// Here comes the JavaScript bits!


Replace with:


// ADKcr css and JavaScript!
if (!empty($modSettings['ADKcr_Act'])) {
if (empty($options['ADKcr_Act_user']))
echo'
<script type="text/javascript">
var ADKcrImages ="'.$settings['default_images_url'].'/ADKcr/Adk_Arrow.gif";
</script>
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/ADKcr.css" />
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/ADKcr_jquery.js"></script>
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/ADKcr_Script.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($){
$(\'*\').addcontextmenu(\'ADKcr\')
})
</script>
';
}

// Here comes the JavaScript bits!

Title: Re: Adk Click Right
Post by: kat on October 04, 2011, 01:37:11 PM
Ah, right.

I expected it to tell me that it couldn't modify the file, rather than that it couldn't replace the whole file.

I'll let it do it's thing and see what happens, then.

The more I use SMF v2, the less I'm liking it...

Thanks, man!
Title: Re: Adk Click Right
Post by: GlitchPC on October 07, 2011, 08:38:50 AM
Installed...

However, if the right-click menu appears over the navigation menu which runs across the top of my forum, the navigation menu links interfere with the right-click menu.  See attached image.

Until there's a fix...I'll have to "disable" this mod.

Edit:  Also, it would be nice if we could add our own image for visitors...instead of the default ADK image.

Additional Edit:  The above mentioned issue only appears if I'm using my custom themes, which, at this time, are the Anecdota and Reference themes I installed from Crip...available through SMF Modifications/Themes.  The issue does not appear if using the Curve and/or Core themes.
Title: Re: Adk Click Right
Post by: Adk-Team on October 07, 2011, 11:25:17 AM
The problem is the structure of the themes you use, would be necessary to relocate the code of the mod.

As for the image, you only have to replace the image in the folder of images.
Title: Re: Adk Click Right
Post by: GlitchPC on October 07, 2011, 12:03:47 PM
Thank you for the quick reply.  I updated one of my old themes with a newer version and this seemed to fix the issue.  Apparently, it does have something to do with the theme's structure.  Just need to see if the developer has an update for the other theme I have installed.  Either that...or just uninstall the problem theme.  Thanks, too, for the information about changing the image.

Thanks...for a great mod!

Edit:  Well...I just tried uploading a new (Adk_CR.png) image and overwrote the previous image...however, it did not change the image.  I cleared the cache and tried again...still no go.  I made sure I uploaded the image to the correct directory of one of the themes I am using...still...no go.  Any suggestions?
Title: Re: Adk Click Right
Post by: Adk-Team on October 07, 2011, 02:39:42 PM
Replaces the image in default theme  ;)
Title: Re: Adk Click Right
Post by: GlitchPC on October 07, 2011, 02:44:29 PM
Thanks...working.  I appreciate the fast support.
Title: Re: Adk Click Right
Post by: Adk-Team on October 07, 2011, 03:11:46 PM
It is a great pleasure to help :D
Title: Re: Adk Click Right
Post by: reefforum on December 23, 2011, 11:53:54 AM
Looks like enabling this mod disables the copy/paste option, correct?  anyway around this?
Title: Re: Adk Click Right
Post by: GlitchPC on December 23, 2011, 02:37:37 PM
disable it in your forum profile/look and layout
Title: Re: Adk Click Right
Post by: GlitchPC on December 23, 2011, 02:39:29 PM
you can also use the copy/paste links from your browser
Title: Re: Adk Click Right
Post by: reefforum on December 23, 2011, 07:11:34 PM
Quote from: GlitchPC on December 23, 2011, 02:37:37 PM
disable it in your forum profile/look and layout

Disable what? The mod? 

Question rephrased:  can I add copy/ paste as one of the right click options?
Title: Re: Adk Click Right
Post by: GlitchPC on December 23, 2011, 07:25:07 PM
No...I didn't mean disable the mod.  I meant each user can disable the mod if he/she wants to...through the settings I gave you, above.

As far as creating copy/paste as a function...you'll have to see what the mod author suggests.  As far as I know...you can only link to specific URLs.
Title: Re: Adk Click Right
Post by: Adk-Team on December 24, 2011, 11:28:09 AM
No, if you activate the mod disables all browser options.
Only you can copy by selecting the text and pressing "Ctrl + c" and paste squeezing "Ctrl + v"
Title: Re: Adk Click Right
Post by: GlitchPC on December 24, 2011, 04:37:37 PM
Quote from: Adk-Team on December 24, 2011, 11:28:09 AM
No, if you activate the mod disables all browser options.
Only you can copy by selecting the text and pressing "Ctrl + c" and paste squeezing "Ctrl + v"

I'm using Chrome and this mod does NOT disable all browser functions.  I'm still able to select text and use the browser's menu to cut/copy/paste.  What this mod does is disable the normal "right-click" and substitutes it with the settings you have chosen for this mod.
Title: Re: Adk Click Right
Post by: Adk-Team on December 24, 2011, 07:20:50 PM
Obviously I meant to the options click right mouse ;)
Title: Re: Adk Click Right
Post by: performer189 on January 08, 2012, 01:44:27 PM
is there any way to use it on SMF 2.0 RC3 ? please help.
Title: Re: Adk Click Right
Post by: Adk-Team on January 08, 2012, 08:31:51 PM
SMF 2.0 RC3 do not use hooks
Title: Re: Adk Click Right
Post by: Adk-Team on January 20, 2012, 01:45:28 PM
Updated to 2.0.2
Title: Re: Adk Click Right
Post by: GlitchPC on January 21, 2012, 01:08:34 PM
I had to uninstall this modification today...after updating to your latest version.  I uninstalled your old mod and installed your latest version for SMF 2.02.  It, apparently, causes an issue with the Glossary modification (http://custom.simplemachines.org/mods/index.php?mod=1525) I have installed.  There seems to be some type of JavaScript and/or jquery conflict.
Title: Re: Adk Click Right
Post by: Adk-Team on January 21, 2012, 03:05:22 PM
Be sure not to load the same library twice.
Title: Re: Adk Click Right
Post by: GlitchPC on January 21, 2012, 04:27:48 PM
Like I said...I uninstalled your old mod.  Then installed the new mod through Package Manager.  No libraries were installed twice...as far as I know.  Which file/library are you referring to?
Title: Re: Adk Click Right
Post by: Adk-Team on January 22, 2012, 10:28:26 AM
The conflict has to be in the jquery library.
The mod uses "jQuery.noConflict()" but I do not know if they do other mods installed.
Title: Re: Adk Click Right
Post by: Adk-Team on February 18, 2013, 07:16:29 PM
Smf 2.0.4 updated  ;)

Regards enik...
Title: Re: Adk Click Right
Post by: Sudhakar Arjunan on March 12, 2013, 06:42:49 PM
nice and useful mod.
Title: Re: Adk Click Right
Post by: ZerK on March 12, 2013, 11:26:57 PM
nice mod!
for the first modification to the index.template.php you could add after instead of replace. also add a higher z-index to the menu.
Title: Re: Adk Click Right
Post by: akbora on April 13, 2013, 03:34:39 PM
Does the menu include copy past option?
Title: Re: Adk Click Right
Post by: Adk-Team on May 09, 2013, 04:24:47 AM
The mod does not bring that function.