This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Where are Permissions by role defined in the Database?

Where are Permissions by role defined in the Database?

I have created a Module that uses the _perm hook but I am curious where it is actually stored within the system? I have looked throught the database and cannot find it under any of the tables.

I thought it would be under the variables table but did not see it in there.

Very curious because I wanted to clean up some old hooks I made. Mostly because I want to know where Drupal keeps this list.

Thanks!

Form validation for user profiles?

I've added a bunch of new user profiles under: administer -> users -> configure -> profiles

If I want to do some simple data validation on these new fields, what is the most logical place to put my PHP code?

thanks!

Adding to onload

I wrote this small module to add my onload stuff:

function mytheme_onload() {
  return array("MM_preloadImages('myimages.png', 'myimages2.png')");
} 

I get the following error with image/view:

Flexinode Images - resizing on upload.

Hi all.

Is it possible to have flexinode resize the images on upload?

So if a user uploads an image that is 1024x768 and 1.5mb , flexinode resizes it to become only 640x480 and 500kb?

thanks

Mr Maggoo

image filter

I've modified urlfilter to create imagefilter. This will convert the address of any image (url of a file ending with jpg,jpeg,png,gif) into an inline img tag. This img will be surrounded by a div class "image" which you can modify in your css.

so effectively with this filter, all you have to insert an image into a node or comment, is to just paste the address of a picture, something like wiki if i'm not mistaken.

file:
imagefilter.module



function imagefilter_help($section) {
  switch ($section) {
    case 'admin/modules#description':
      return t("Automatically turns '.gif', '.jpg', '.jpeg' and '.png' addresses into inline images.");
  }
}


hope somebody finds this useful
function imagefilter_filter_tips($delta, $format, $long = false) {
  return t("'.gif', '.jpg', '.jpeg' and '.png' addresses automatically turn into inline images.");
}

function imagefilter_filter($op, $delta = 0, $format = -1, $text = '') {
  switch ($op) {
    case 'list':
      return array(0 => t("Image filter"));

    case 'description':
      return t("Automatically turns '.gif', '.jpg', '.jpeg' and '.png' addresses into inline images.");

    case 'process':
      $text = ' ' . $text . ' ';


      $HTMLbefore="<div class=image><img src='";
      $HTMLafter="'></div>";

      $text = preg_replace(
        '!(<p>|[ \n\r\t\(])([a-zA-Z0-9@:%_~#?&=.,/;-]*)\.(jpg|jpeg|gif|png)(</p>|[ \n\r\t\)])!i' ,
        " ".$HTMLbefore."$2.$3".$HTMLafter." " ,
        $text
      );

      $text = substr($text, 1, -1);

      return $text;

    default:
      return $text;
  }
}


A simple text editor that works...can it be that difficult?

I have been using Drupal for the past 3 months now and I find it lives upto all my expectations bar one thing: Text input.

I use FCKeditor and although better than htmlarea it still has so many flaws.

I was wondering, since text input is one of the most important aspects of any website, is it so hard to make a simple input editor? How come this issue has been left out of the programming development? Is there any future for text imput that is compaitble on all browsers?

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions