I just finished adding a new block to the forward module that add a block with the forward form. This way you can have the form inline in a block and just inline in the page.

If anyone has any suggestions for fixing it, please let me know. I would like to figure out how to add some AJAX to it so that it will submit inline and return a message right in the block.

Comments

designerbrent’s picture

StatusFileSize
new14.53 KB

This update add security functionality to the block so that if the user doesn't have access permission to see the block, it won't show. This is a replacement for the previous patch. Not an updgrade.

Rosamunda’s picture

Are plans to add this at the module?
As I´m not a programmer, nor have programmer skills, it´s kinda difficult to me to patch, and must admit that never could make any patching correctely by myself.
It would be very kind if someone could upload the module already patched with this EXCELLET feature!!!

This feature should be part of the module indeed! Most users won´t click a link to go to a forward page... (I don´t)...

Thank you very much for your patience and help!!!
:-)

designerbrent’s picture

Anyone interested in seeing this get into the module? What do I need to get this reviewed and patched into the main module?

manoloka’s picture

I'm with you but don't have the skill to do it :-(

missym’s picture

I added a request for a similar feature here:

http://drupal.org/node/252026

I'd like to add a feature to Forward to send a link to any page (not just nodes) by adding another argument so that it looks like this www.mysite.com/forward/linktopath/linktoargument so that if you want to send a link to a node you can say www.mysite.com/forward/node/1234 or another module type www.mysite.com/forward/modulename/argument. You'd need a way to put the code on your page and some revisions to the submit form to handle the send.

I put a $50 bounty on it. If you could use this feature, it would be great if you could kick in some, too.

grendzy’s picture

I don't have a patch for this, but I wrote a blog post about implementing this block as a custom module:
http://www.opensourcery.com/blog/dylan-tack/creating-block-contributed-m...

Someone could probably roll this into a patch if there's enough interest.

grendzy’s picture

Version: 4.7.x-1.x-dev » 6.x-1.x-dev
grendzy’s picture

Status: Needs review » Active
marco88’s picture

I would like to use this block to replace the "tell a friend" module

Subscribing

Marc.

srjosh’s picture

StatusFileSize
new1.55 KB

I'm not entirely certain if I should throw another patch into the works here, but I would love some feedback on this. It's not as elaborate as the previous one, but it seems to do the job. I haven't tested the block form too much, as we decided the link looked good for our purposes.

srjosh’s picture

Status: Active » Needs review
srjosh’s picture

StatusFileSize
new2 KB

I suppose before I submit a patch I should probably make sure it really works as advertised. *sigh* version .1

srjosh’s picture

StatusFileSize
new4.88 KB

now with more admin options.

eyecon-1’s picture

This patch seems to break the current release forward-6.x-1.5. In fact, it breaks the site. Fortunately I was testing this on a local machine so NBFD.

With panels 3 now very stable, I want to use a revised node view. However, that requires that this be in a block so that you can create a forward pane in the panel.

mkalkbrenner’s picture

Sorry, I didn't notice this issue before and created a similar one with small differences:
#398234: Provide Forward Block

seanr’s picture

Let's combine the patches and get a new one up here and I'll test it. Please be sure to update to the latest version; there have been recent changes.

CarbonPig’s picture

subscribe

joachim’s picture

Status: Needs review » Needs work

The patches in #12 and #13 are unusable because they have no context and the code is going in the wrong places.
Please use 'diff -up' to generate your patches.

I'm having a look at reworking the code from them into the current release.
However, I disagree with some of the implementation.

In particular:
> '#options' => array('link' => 'link', 'form' => 'form','blocklink' => 'block link','blockform' => 'block form'),
Adding two more options creates much more mess to check each time there's a possibility to output something from this module.
I would suggest:
- store blocklink/blockform as settings for the block.
- add only one option to form/link so we have form/link/none.
This means you'd choose 'none' if you are enabling the block, and also the 'none' option would let advanced themers do their own theming of the forwarding link or form.

joachim’s picture

Status: Needs work » Needs review
StatusFileSize
new8.49 KB

... which is pretty much the approach the patch by mkalkbrenner posted at #398234: Provide Forward Block does.

Here is that patch re-rolled for the current release. (Diffed from my SVN rather than CVS, but the check-in there is the latest release of this module.)

seanr’s picture

Thanks for your work. I'm going to test that this week. Can we get some others of you to try it as well and make sure it all works?

joachim’s picture

One tweak, which could probably be done as a subsequent issue and patch:
the block doesn't take the value of forward_link_title to make the link text.

seanr’s picture

Looks perfect. I just fixed the omission mentioned in #21 and committed it. Thank you very much. I'll have a new release out soon but the dev package should update later today.

mkalkbrenner’s picture

I was excited as I noticed today that my patch from #398234: Provide Forward Block went into forward 6.x-1.10 release. Thanks to joachim for merging it at #19.
But I was suprised that a FIXME comment I added made it into the release, too.

  if ((($type == 'node' && variable_get('forward_display_'. $node->type, '1')) || $type == 'comment')
    && user_access('access forward') && variable_get('forward_form_type', 'link') == 'link') {
    $links = array();
    // FIXME $type could not be 'system' due to condition above
    //    if (($type == 'system')) {
    //      // URL, page title, func called for page content, arg, 1 = don't disp menu
    //      menu('forward', t('Email this page'), 'forward_page', 1, 1);
    //    }

My patch added the FIXME comment and disabled the dead code I found in forward.module during working in the patch.
Now it's up to the author of forward to fix this or completely remove the dead code.

seanr’s picture

Status: Needs review » Fixed

I left it in for later review but then forgot about it. I'll clear that out in the next release. Marking this issue fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.