Giter Site home page Giter Site logo

gedit-drupal's Introduction

This project contains Snippet for getid to have a rapid development for Drupal devel

= INSTALLATION =================================================================

  a)  Clone repository on your machine:

        # git clone git://github.com/mavimo/gedit-drupal.git
        # cd gedit-drupal

  b)  Copy language definition into /usr/share/gtksourceview-2.0/language-specs/

        # sudo cp drupal.lang /usr/share/gtksourceview-2.0/language-specs/

  c)  Create a new mimetype into your machine

        # sudo cp mimetype/drupal.mime.xml          /usr/share/mime/packages/drupal.mime.xml
        # sudo cp mimetype/drupal-theme.mime.xml    /usr/share/mime/packages/drupal-theme.mime.xml
        # sudo cp mimetype/drupal-profile.mime.xml  /usr/share/mime/packages/drupal-profile.mime.xml
        # sudo cp mimetype/drupal-make.mime.xml     /usr/share/mime/packages/drupal-make.mime.xml

  d)  Update mimetype database

        # sudo update-mime-database /usr/share/mime

  e)  Add icon into your icons folder, first of all find your iconset name 
      (gnome, Tangerine, ..), and copy into this folder (on scalable subfolder)
      icon file:
      
        # sudo cp icons/application-x-drupal-php.svg          /usr/share/icons/ICONSET_NAME/scalable/mimetype/application-x-drupal-php.svg
        # sudo cp icons/application-x-drupal-tpl-php.svg      /usr/share/icons/ICONSET_NAME/scalable/mimetype/application-x-drupal-tpl-php.svg
        # sudo cp icons/application-x-drupal-profile-php.svg  /usr/share/icons/ICONSET_NAME/scalable/mimetype/application-x-drupal-profile-php.svg
        # sudo cp icons/application-x-drupal-make-php.svg     /usr/share/icons/ICONSET_NAME/scalable/mimetype/application-x-drupal-make-php.svg
      
      after that regenerate iconset cache:
      
        # cd /usr/share/icons
        # sudo gtk-update-icon-cache ICONSET_NAME

  f)  Enable Snippet plugin from

        Edit -> Preferences -> Plugins

      If not already aviable please install it from your distrubution system, for 
      debian / ubuntu system you can use repostitory at deb.mavimo.org:

        # sudo sh -c "echo 'deb http://deb.mavimo.org/ binary/' >> /etc/apt/sources.list"
        # sudo apt-get update
        # sudo apt-get install gedit-plugins

  g)  Add variuos snippets

        Tools -> Manage Snippets ...

      Press "Import snippets" button (second from left on bottom) and import *.xml file
      do you require. After that you can use drupal-snippet

= USAGE ========================================================================

Using Snippet is very simple, when you write a drupal module or install file 
please select, from View -> Highlight Mode -> Scripts -Drupal, and now you can
write your code with snippet accelerator, a complete list of snippet is aviable
on file SNIPPET_LIST
If you create new mimetype to you machine is not required set Highlight Mode, sistem
automatically detect it.

gedit-drupal's People

Contributors

mavimo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gedit-drupal's Issues

drupalapi plugin in wrong directory.

The drupalapi plugin is not picked up by gedit ubuntu-10.10

When I symlinked to the root "/usr/lib/gedit-2/plugins/" directory, things worked; gedit found the plugin and could enable it.

/usr/lib/gedit-2/plugins $ ls -ahl drupal*
lrwxrwxrwx 1 root root   32 2010-08-31 10:57 drupalapi.gedit-plugin -> drupalapi/drupalapi.gedit-plugin
lrwxrwxrwx 1 root root   23 2010-08-31 10:57 drupalapi.png -> drupalapi/drupalapi.png
lrwxrwxrwx 1 root root   22 2010-08-31 10:57 drupalapi.py -> drupalapi/drupalapi.py

drupalapi:
totaal 28K
drwxr-xr-x  2 root root 4,0K 2010-08-27 20:19 .
drwxr-xr-x 24 root root  12K 2010-08-31 10:57 ..
-rw-r--r--  1 ber  ber   232 2010-08-27 18:00 drupalapi.gedit-plugin
-rw-r--r--  1 ber  ber   795 2010-08-27 18:00 drupalapi.png
-rw-r--r--  1 ber  ber  3,6K 2010-08-31 10:51 drupalapi.py

hook_user minor t() issue

in hook user your snippet adds a t() around name in category.

E.g.
$categories = array(
'name' => t('newsletters'),
but that should be:
$categories = array(
'name' => 'newsletters',

Pardon my ignorance wrt diffing and patching in git: I could not manage to put this in a patch easily.

/usr/lib/gtk-2.0/modules/libglobalmenu-plugin.so: wrong ELF-class: ELFCLASS64

Hi,
i'm using Ubuntu 10.10 X86_64.
when I try to use the "apilookup" command in this plugin, to look for the word
in api.drupal.org, gedit gets minimized and i cannot use normally any more,
till i restart it.
When the issue occurs, i'm not able to klick in the gui anywhere. Everytime i
klick, in the window, the window get stretched out of the screen. Nothing in
the window is klickable, till i restart.
But the feature works. I can see that the browser apearing in the bottom of
gedit.
When i start gedit from a terminal i can see that message:
Gtk-Message: Failed to load module "globalmenu-plugin":
/usr/lib/gtk-2.0/modules/libglobalmenu-plugin.so: falsche ELF-Klasse:
ELFCLASS64
** (gedit:31036): DEBUG: NP_Initialize
** (gedit:31036): DEBUG: NP_Initialize succeeded
** (gedit:31036): DEBUG: NP_Initialize
** (gedit:31036): DEBUG: NP_Initialize succeeded
** (gedit:31036): DEBUG: NP_Initialize
** (gedit:31036): DEBUG: NP_Initialize succeeded
** (gedit:31036): DEBUG: NP_Initialize
** (gedit:31036): DEBUG: NP_Initialize succeeded
** (gedit:31036): DEBUG: NP_Initialize
** (gedit:31036): DEBUG: NP_Initialize succeeded
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.2) (6b20-1.9.2-0ubuntu2)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

I'm definitely using the right version of libglobalmenu-plugin.so.
I'm using:
libglobalmenu-gnome_0.7.10-0ubuntu1webupd8maverick2_amd64.deb
md5sum -b libglobalmenu-plugin.so = 4e445fe73446c0a5d4a0d091b3c480c4.

FAPI markup

Placeholder are not parsed, missing default value.

Add new hook

There are some hook to add:

  • hook_flush_caches
  • hook_footer
  • hook_hook_info
  • hook_locale
  • hook_mail
  • hook_mail_alter
  • hook_menu_alter
  • hook_menu_link_alter
  • hook_node_access_records
  • hook_ping
  • hook_prepare
  • hook_profile_alter
  • hook_requirements
  • hook_term_path
  • hook_theme_registry_alter
  • hook_translated_menu_link_alter
  • hook_update_index
  • hook_user_operations
  • hook_watchdog
  • hook_xmlrpc

Snippets, Karmic Koala / gedit 2.28.0: $GEDIT_BASENAME changed

after upgrading my ubuntu 9.04 to 9.10, I got the following error message, when creating a hook or something other requiring the "module name":

...
global name 'module_name' is not defined

and in the console:

Traceback (most recent call last):
File "/usr/lib/gedit-2/plugins/snippets/Placeholder.py", line 550, in expand
  exec text in self.namespace
File "<string>", line 7
   if $GEDIT_BASENAME != '' :
      ^
SyntaxError: invalid syntax

This issue can be manually be solved, by replacing the $GEDIT_BASENAME variable name through $GEDIT_CURRENT_DOCUMENT_NAME inside the snippets (this tip I found here http://osdir.com/ml/svn-commits-list/2009-05/msg06562.html )...

Easily done with sed:
cd ~/.gnome2/gedit/snippets/
sed -i 's/$GEDIT_BASENAME/$GEDIT_CURRENT_DOCUMENT_NAME/g' drupal.xml

Greets,
..and btw: thanks for this great addition, makes my live so much easier ;)

Cannot activate plugin on Centos 5

I see the it on the plugin list, but I cannot activate it.
Launching gedit from terminal I get the following error messages:

(http://pastebin.com/NvAQ5RzN)

(gedit:3252): GtkSourceView-WARNING **: Usupported language spec version '2.0' in file '/usr/share/gtksourceview-1.0/language-specs/drupal.lang'

(gedit:3252): GtkSourceView-WARNING **: Error reading language specification file '/usr/share/gtksourceview-1.0/language-specs/drupal.lang'

It looks to be something related to the xml version (all other plugins use 1.0), GtkSourceView even being up to date does not have the folder gtksourceview-2.0 on Centos 5.

Readme install a)

How it's now:
a) Create a new folder and clone repository on your machine:

    # mkdir gedit-drupal
    # cd gedit-drupal
    # git init
    # git clone git://github.com/mavimo/gedit-drupal.git

Instead it should be:
a) Clone repository on your machine:

    # git clone git://github.com/mavimo/gedit-drupal.git
    # cd gedit-drupal

hook_block error

In the API "if else" is used to select, you use "switch case"
This provides an error when clicking on "configure" in the blocks section.
This only happens when the case "configure" and "save" are deleted which are often not used.

Error: "Cannot use string offset as an array"

'Test' ); return $blocks; break; /_ case 'configure': $form = array(); switch ($delta) { case 0: # form code break; case 1: # form code break; } return $form; case 'save': switch ($delta) { case 0: # form code break; case 1: # form code break; } break; */ case 'view': default: switch ($delta) { case 0: $block['subject'] = 'Test'; $block['content'] = 'Test Content'; break; } return $block; } } ?>

Can't view Drupal language in language list

When select Manage Snippets menu item, I see languages, registered in my system (Ubuntu 13.14), but I can't see Drupal language.

Solution is that I copy drupal.lang file into /usr/share/gtksourceview-3.0/language-specs/ instead of /usr/share/gtksourceview-2.0/language-specs/

dpkg -l gedit
ii gedit 3.6.2-0ubuntu1 amd64 official text editor of the GNOME desktop environment
ii gedit-common 3.6.2-0ubuntu1 all official text editor of the GNOME desktop environment (support fil
ii gedit-developer-plugins 0.5.15-0ubuntu1 all A set of gedit plugins for developers
ii gedit-drupal 0.12 all Gedit customization to Drupal developer
ii gedit-plugins 3.6.1-0ubuntu2 amd64 set of plugins for gedit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.