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

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?

Modules up for adoption

Sometime in the next month or 2, I'm going to be pulled into a non-Drupal project for a few months. As I won't have much time to spend on the modules that I've created thus far, I'm placing them up for adoption. Anyone interested in taking over the maintenance of any of these please let me know. I don't want to see them rot on the vine and would rather somebody potentially take them in a different direction then have them sit unused and neglected.

attached_node
Status: Working
Needs: Future maintenance and occasional bug fixes (currently a few to look at)

editasnew
Status: Working
Needs: Future maintenance and occasional bug fixes

relativity
Status: Functional but not quite 100%. Will be soon, though.
Needs: TLC, proper documentation/help, rethink the UI a bit (simplify it)

moblog
Status: Functional but not very robust. Relies on mime_registry. Neglected for quite a while now.
Needs: Current and future maintenance. Needs to be made stable enough to be part of a public project. This is not a simple project, so buyer beware.

mime_registry

Authentication module development - HELP!

Hello,

I'm trying and failing to create a very simple authentication module. Can anyone tell me why this isn't working? This is just a test setup to see if the hooks are working. The module is called "portal."

Thank you!

function portal_auth($username, $password, $server) {
	return false;
}

function portal_info($field = 0) {
	$info['name'] = 'portal';
	$info['protocol'] = 'XML-RPC';
	
	if ($field)
		return $info[$field];
	else
		return $info;
} 

Pages

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