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

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;
} 

Help Needed

Hi,
We are trying to develop a website( role based-content management system).
The requirements are as follows:

There will be a menu option ("Application Form")on the frontpage.
When the end-user clicks on Application Form menu,it should display a form with following text fields.
- Name of Applicant
- Department
- Address
- Email Address
-Submit button

when the user clicks on Submit button,the form should be forwarded to user with the login-ID "CLERK".
Now,the CLERK needs to approve the form submitted by END-USER ,after getting approval from CLERK,the form should be forwarded to SITE-ENGINEER.When the SITE-ENGINEER approves it,it should be forwarded to ENGINEER.

FYI,CLERK,SITE-ENGINEER and ENGINEER are the authorized users who will log-in using there IDs and will act as a authorised person to approve the request.

In short the flow should be like this............
Step I:End user will fill-up the Application Form and submit the form.
Step II:When CLERK will login,the submited application form will wait for approval from CLERK.
Step III:When SITE-ENGINEER will login,the clerk approved application form will wait for approval from SITE-ENGINEER.
Step IV:When ENGINEER will login,the site-engineer approved application form will wait for approval from ENGINEER.

I mean,there will be four users,ENDUSER,CLERK,,SITE-ENGINEER, and ENGINEER and ENDUSER doesn't require any login.The Application Form option will be available on the front-page.Any one can access and use the application form to submit his/her application but it is the resposiblity of CLERK,SITE-ENGINEER and ENGINEER to process that form and put proper comments on the request either on APPROVAL or REJECTIOn of application.

Form validation not working

Hi all!

Pages

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