It is currently Sun Jul 20, 2008 12:47 am

Tell a Friend, Send page, Recommend to a Friend. Site + current page

Discuss the development and implementation of Joomla! modules here.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.

Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby elmoch on Fri Feb 17, 2006 7:03 pm

UPDATE on August 22, 2006.
Release Candidate 1: JM-Recommend v1.1 RC1. Further explanation in reply # 32.

*******************
UPDATE
New beta version available: JM-Recommend v1.1 beta. Further explanation in reply # 23.

*******************

Hello, Community!

These are the first component and module that I have written for Joomla!
Many people (me among them) have been asking for a module which allowed the visitors to send the page they were viewing to their friends. Well, here it is.
For the moment, the component works basically as others already published, i.e. allows to recommend just the site. The module, on the contrary, combined with the component, lets the visitor send the current page as well.
Both can be used at the same time in the frontend: the component linked in a menu and the module in a module position.

I must say I'm not a programmer at all, so what I did was put pieces of other components and modules together to make my own ones.
I borrowed some code from the email function in the core content component, some from the old com_recommend by Saka and, for the module, some lines from the Bookmark Us module by kabam.

Languages:
English, French, German and Spanish language files are included in the package.
Versions of the Admin info file in Spanish and English are included as well.
The right file versions will be picked by the component according to the Global Configuration of Joomla!

As for the module, en.readme.txt (English) and es.readme.txt (Spanish) are available and installed in /modules/mod/recommend_plus/.

The resulting code may not be elegant because, as I said before, I don't know much about coding, but it works. I have tested the component and the module in IE 6.0, FF 1.5 and Opera 8.5.

I have installed both the component and the module in my test Joomla! directory: http://www.poraqui.net/joomla&nbsp; User: test  Password: test, just in case you want to "try before install".

I don't have the skills nor the time to open a project in the Forge. If anyone else wants to do so, it's OK, this addons are released under the GNU/GPL license. I intend to upload them in some repositories after they have been tested for a while.

Comments, improvements and suggestions are welcome. Thank you in advance. :)

======
NOTE. Other extensions of mine:
  • JM-Link Us. A "Link to Us" component with administration panel. Link To Us, Link Us, Link to this Site, Site Promotion.
  • JM-Credits. A Credits Component for Joomla! Credit the authors of the extensions and templates used in your site.
You do not have the required permissions to view the files attached to this post.
Last edited by elmoch on Tue Aug 22, 2006 11:50 am, edited 1 time in total.
My Extensions: JM-Recommend, JM-Credits, JM-Link Us (for J! 1.0.x). Find them in the 3rd Party Extensions Forum.
Joomla test installation: www.poraqui.net/joomla  User: test  Password: test
elmoch
Joomla! Engineer
Joomla! Engineer
 
Posts: 410
Joined: Fri Aug 26, 2005 10:13 pm
Location: Spain

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby maddunr on Mon Feb 27, 2006 4:42 pm

elmoch,

this seems to be a wonderful module. great work! :)

-V
Last edited by maddunr on Mon Feb 27, 2006 4:45 pm, edited 1 time in total.
maddunr
Joomla! Engineer
Joomla! Engineer
 
Posts: 273
Joined: Thu Oct 06, 2005 4:43 pm

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby elmoch on Tue Feb 28, 2006 7:33 pm

Thanks maddunr,
I'm glad that you like it.  :laugh:
I'm still open to suggestions! ;)
My Extensions: JM-Recommend, JM-Credits, JM-Link Us (for J! 1.0.x). Find them in the 3rd Party Extensions Forum.
Joomla test installation: www.poraqui.net/joomla  User: test  Password: test
elmoch
Joomla! Engineer
Joomla! Engineer
 
Posts: 410
Joined: Fri Aug 26, 2005 10:13 pm
Location: Spain

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby LocALiceR on Wed Mar 15, 2006 1:44 pm

Hi, elmoch!

Congratulations to your extension! Really, it makes easy to forward a specific link of a site.
I would have 2 suggestions:

1) Integrate the Security Images component by Walter Cedric into your extension
2) Logging the recommendations and to be able to look at the statistics at the backend.

Keep up the good work!
Jozsef Tamas Herczeg // Board Member of Joomla! User Association Hungary :: "Do not give fish to the hungry man teach him how to fish instead"
User avatar
LocALiceR
Joomla! Enthusiast
Joomla! Enthusiast
 
Posts: 206
Joined: Thu Sep 15, 2005 4:44 am
Location: Hungary

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby elmoch on Wed Mar 15, 2006 3:34 pm

Thank you, LocALiceR.
Good suggestions. I guess it wouldn't be too difficult to implement them (for a professional, not me), but I'm developing another component at the moment...  8)
I may review these extensions later (No roadmap or whatever, though, I'm sorry  :))
My Extensions: JM-Recommend, JM-Credits, JM-Link Us (for J! 1.0.x). Find them in the 3rd Party Extensions Forum.
Joomla test installation: www.poraqui.net/joomla  User: test  Password: test
elmoch
Joomla! Engineer
Joomla! Engineer
 
Posts: 410
Joined: Fri Aug 26, 2005 10:13 pm
Location: Spain

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby LocALiceR on Wed Mar 15, 2006 5:33 pm

No problem at all. These were only suggestions  :)
Jozsef Tamas Herczeg // Board Member of Joomla! User Association Hungary :: "Do not give fish to the hungry man teach him how to fish instead"
User avatar
LocALiceR
Joomla! Enthusiast
Joomla! Enthusiast
 
Posts: 206
Joined: Thu Sep 15, 2005 4:44 am
Location: Hungary

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby LocALiceR on Thu Mar 16, 2006 12:52 pm

By the way, Security Images is not so complicated to integrate. Walter Cedric published the required code. Please check http://waltercedric.com/wiki/index.php?title=Using_com_securityimages_in_your_code
Jozsef Tamas Herczeg // Board Member of Joomla! User Association Hungary :: "Do not give fish to the hungry man teach him how to fish instead"
User avatar
LocALiceR
Joomla! Enthusiast
Joomla! Enthusiast
 
Posts: 206
Joined: Thu Sep 15, 2005 4:44 am
Location: Hungary

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby elmoch on Thu Mar 16, 2006 6:27 pm

You're right, LocALiceR.
That's what I had read somewhere. I'll bookmark that page right away!

Thanks a lot!  :)
My Extensions: JM-Recommend, JM-Credits, JM-Link Us (for J! 1.0.x). Find them in the 3rd Party Extensions Forum.
Joomla test installation: www.poraqui.net/joomla  User: test  Password: test
elmoch
Joomla! Engineer
Joomla! Engineer
 
Posts: 410
Joined: Fri Aug 26, 2005 10:13 pm
Location: Spain

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby JenniAnn on Wed Apr 05, 2006 5:40 pm

I have just installed the Recommend Plus module and component. I have successfly installed them onto my Joomla site, and I very much appreciate them. However, currently the link to send this site to a friend just says, "this site." I looked in the php and XML files to see about changing it, but I wasn't sure which line(s) to alter for this change to take place. Could someone direct me in changing the link's text without affecting the link itself? That would be very much appreciated. If the module said "Reccommend site" rather than "this site," it would be perfect. But Alas, noting is perfect.. yet.
User avatar
JenniAnn
Joomla! Apprentice
Joomla! Apprentice
 
Posts: 20
Joined: Fri Jan 27, 2006 8:10 pm

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby elmoch on Thu Apr 06, 2006 7:39 pm

JenniAnn wrote:I have just installed the Recommend Plus module and component. I have successfly installed them onto my Joomla site, and I very much appreciate them.

Thank you. I'm happy about that!  :)

JenniAnn wrote:However, currently the link to send this site to a friend just says, "this site." I looked in the php and XML files to see about changing it, but I wasn't sure which line(s) to alter for this change to take place. Could someone direct me in changing the link's text without affecting the link itself? That would be very much appreciated.


You have to modify your language file (e.g. english.php), which is placed in /components/com_recommend_plus/langauge/.
Line # 29 reads DEFINE("_RCP_THIS_SITE","this site");. Just change "this site" to whatever you like. 8)

JenniAnn wrote: If the module said "Reccommend site" rather than "this site," it would be perfect. But Alas, noting is perfect.. yet.


You can replace "this site" with "Recommend Site". That's all. Not perfect, but almost.  :laugh:
My Extensions: JM-Recommend, JM-Credits, JM-Link Us (for J! 1.0.x). Find them in the 3rd Party Extensions Forum.
Joomla test installation: www.poraqui.net/joomla  User: test  Password: test
elmoch
Joomla! Engineer
Joomla! Engineer
 
Posts: 410
Joined: Fri Aug 26, 2005 10:13 pm
Location: Spain

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby JenniAnn on Thu Apr 06, 2006 8:15 pm

Thank you so much! That was the clearest instruction to follow, and the simplest thing to do. I was wondering if it would also be possible to have the image also be the link, rather than having the "send this site" next to the image? If it is possible, how would I go about doing this?
    Your module and component is almost perfect, and this is very happy! It's been a bad past couple of days for me and Joomla-- I tried to install at least 5 modules, and yours is the only one with a readable XML file. Thank you so much!
User avatar
JenniAnn
Joomla! Apprentice
Joomla! Apprentice
 
Posts: 20
Joined: Fri Jan 27, 2006 8:10 pm

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby elmoch on Fri Apr 07, 2006 1:37 am

JenniAnn wrote:Thank you so much! That was the clearest instruction to follow, and the simplest thing to do.

You're welcome.  :)

JenniAnn wrote:I was wondering if it would also be possible to have the image also be the link, rather than having the "send this site" next to the image? If it is possible, how would I go about doing this?

Yes, it is.  I think that the following should work:  8)

Edit /modules/mod_recommend_plus.php

Comment out or delete lines # 73, 74 and 77

Code: Select all
    echo "<img src=\"".$rcp_image."\" align=\"absmiddle\" alt=\"\" />";
    echo " ";
  }
 
    echo "<a href=\"javascript:void(0)\" onclick=\"window.open('index2.php?option=com_recommend_plus&task=form&act=".$rcp_act.$rcp_ttl."','mywin','status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=750,height=410,directories=no,location=no');\" title=\"".$rcp_link_text."\">".$rcp_link_text."</a>";


IMPORTANT: Do not delete line # 75 which should contain just a closing curly brace.

Then add this code instead of line # 77

Code: Select all
echo "<a href=\"javascript:void(0)\" onclick=\"window.open('index2.php?option=com_recommend_plus&task=form&act=".$rcp_act.$rcp_ttl."','mywin','status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=750,height=410,directories=no,location=no');\"><img src=\"".$rcp_image."\" align=\"absmiddle\" border =\"0\" alt=\"".$rcp_link_text."\" /></a>";



And, in case you want both image and text linked...

Replace line # 73
Code: Select all
   echo "<img src=\"".$rcp_image."\" align=\"absmiddle\" alt=\"\" />";


with this one
Code: Select all
echo "<a href=\"javascript:void(0)\" onclick=\"window.open('index2.php?option=com_recommend_plus&task=form&act=".$rcp_act.$rcp_ttl."','mywin','status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=750,height=410,directories=no,location=no');\"><img src=\"".$rcp_image."\" align=\"absmiddle\" border =\"0\" alt=\"".$rcp_link_text."\" /></a>";




JenniAnn wrote:Your module and component is almost perfect, and this is very happy! It's been a bad past couple of days for me and Joomla-- I tried to install at least 5 modules, and yours is the only one with a readable XML file. Thank you so much!


That's amazing because I'm not a professional coder.  :o This must be the magic of open source!  :laugh:
My Extensions: JM-Recommend, JM-Credits, JM-Link Us (for J! 1.0.x). Find them in the 3rd Party Extensions Forum.
Joomla test installation: www.poraqui.net/joomla  User: test  Password: test
elmoch
Joomla! Engineer
Joomla! Engineer
 
Posts: 410
Joined: Fri Aug 26, 2005 10:13 pm
Location: Spain

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby Nueaasimar on Tue Apr 25, 2006 1:29 pm

Nice product. I've installed RecommendPlus 1.0 and it works OK however I want to add security images so that unregistered users can refer me.

I'm been to the security image site, I have the latest version working i.e. 3.0.4; and at that page I found the instructions for inserting the code for security images. (I could have copied them from numerous other products/components but didn't think of until I found the site).

The security images code explanation doesn't really say how to put it in. I'm new to this and I'm having problems inserting into the table. I figure the three lines of code should go into the html component file (@version $Id: recommend_plus.html.php v1.0 2006-02-17 ) immediately above the tr for the input 'submit' button. However whatever code I put in kills the table and it won't display below that point.

The threelines of code I have an issue with are from (note the other links in this post seem to now be broken): http://wiki.waltercedric.com/index.php/Using_com_securityimages_in_your_code

And as follows:





Can anyone show me how these should be coded and inserted into the recommendplus.html.php file please?

Rgds,
David.
Nueaasimar
Joomla! Fledgling
Joomla! Fledgling
 
Posts: 2
Joined: Fri Apr 21, 2006 7:39 am

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby elmoch on Wed Apr 26, 2006 6:44 pm

Hello, Nueaasimar and thank you  :)

I'm sorry. I've tried to make it work, but I it didn't.
Here's what I've done on version v1.0

File recommend_plus.html.php
at original line # 20
Insert the following

Code: Select all
// Sets captcha
if (file_exists($mosConfig_absolute_path.'/administrator/components/com_securityimages/client.php')) {
include($mosConfig_absolute_path.'/administrator/components/com_securityimages/client.php');
}



File recommend_plus.html.php
after line # 113
Insert the following

Code: Select all
   
      <tr align="center">
          <td colspan="2">
         <?php echo insertSecurityImage("security_refid"); ?>  
         <?php echo getSecurityImageTextHeader(); ?>  
         <?php echo getSecurityImageField("security_try"); ?><br />
         <?php echo getSecurityImageTextHelp(); ?>
         <br /><br />
         </td>
      </tr>



File recommend_plus.php
at original line # 23
Insert the following

Code: Select all
// Sets captcha processor
if (file_exists($mosConfig_absolute_path.'/administrator/components/com_securityimages/server.php')) {
include ($mosConfig_absolute_path.'/administrator/components/com_securityimages/server.php');
}
$checkSecurity = checkSecurityImage($security_refid, $security_try);




File mod_recommend_plus.php
Change line # 77 as follows

Code: Select all
   
echo "<a href=\"javascript:void(0)\" onclick=\"window.open('index2.php?option=com_recommend_plus&task=form&act=".$rcp_act.$rcp_ttl."','mywin','status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=750,height=550,directories=no,location=no');\" title=\"".$rcp_link_text."\">".$rcp_link_text."</a>";


I also tried inserting this code I found in the plug-in provided by the author in the plugin for the contact component (http://forge.joomla.org/sf/go/projects. ... components).

Code: Select all
      if( file_exists($mosConfig_absolute_path.'/administrator/components/com_securityimages/client.php') AND !$checkSecurity ) {
         mosErrorAlert( "You did not enter the right word from security picture, please retry!" );
      }


I inserted it more or less in the same position as the author but processing always results in error. In my case I inserted the code right before the following line of recommend_plus.php:

Code: Select all
       if (isset($youremail) and !empty($youremail) and isset($email) and !empty($email)){



That's to say File recommend_plus.php, around line # 154


If you use this line you always get the Alert from securityimages. If you don't, you can post without entering the security characters generated by com_securityimages.  :(

Suggestions are welcome. Thanks.
My Extensions: JM-Recommend, JM-Credits, JM-Link Us (for J! 1.0.x). Find them in the 3rd Party Extensions Forum.
Joomla test installation: www.poraqui.net/joomla  User: test  Password: test
elmoch
Joomla! Engineer
Joomla! Engineer
 
Posts: 410
Joined: Fri Aug 26, 2005 10:13 pm
Location: Spain

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby Nueaasimar on Thu Apr 27, 2006 12:02 pm

Thanks Elmock,

I managed to get it working (I'll show a few extra lines so that readers understand placement...my editor doesn't give me line numbers).

I removed the braces so that the 'Sets captcha' code appears as follows in recommend.html.php:

Code: Select all
//Component version
$cversion = 'v1.0 (2006-02-17)';

// Sets captcha
if (file_exists($mosConfig_absolute_path.'/administrator/components/com_securityimages/client.php'))
include($mosConfig_absolute_path.'/administrator/components/com_securityimages/client.php');

/**


Then I inserted the table as you supplied in the same file, just above the submit button.

Then updated recommend.php by inserting just the 'include' statement at the top thus:

Code: Select all
if (file_exists($mosConfig_absolute_path.'/components/com_recommend_plus/language/' . $mosConfig_lang . '.php')) {
   include_once($mosConfig_absolute_path.'/components/com_recommend_plus/language/' . $mosConfig_lang . '.php');
} else {
   include_once($mosConfig_absolute_path.'/components/com_recommend_plus/language/english.php');
}

include ($mosConfig_absolute_path.'/administrator/components/com_securityimages/server.php');

//Component version
$cversion = 'v1.0 (2006-02-17)';


Then after the email test but before the query I inserted the following security code;

Code: Select all
if (!$email || !$youremail || ( email_ok( $email ) == false ) || (email_ok( $youremail ) == false)) {
      mosErrorAlert( _RCP_ALERT_EMAIL );
   }
      
   
       //security image by www.waltercedric.com
   $security_refid  = trim( mosGetParam( $_POST, 'security_refid', '' ) );
   $security_try     = trim( mosGetParam( $_POST, 'security_try', '' ) );
   $checkSecurity = checkSecurityImage($security_refid, $security_try);
       if( !$checkSecurity) {
      mosErrorAlert( "You did not enter the right word from security picture, please retry!" );
      }


   $query = "SELECT template"


I think I tried every recommended and concievable way of doing this but it didn't work until I had the statement at the top, and the trim/post statements. Unfortunately php isn't my strong point, but hope this works out.

It's getting late so I've only given it a quick test. If you want to try it and see if it works for you please let me know how you go.

Rgds,
David.
Nueaasimar
Joomla! Fledgling
Joomla! Fledgling
 
Posts: 2
Joined: Fri Apr 21, 2006 7:39 am

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby elmoch on Thu Apr 27, 2006 5:29 pm

IT WORKS! IT WORKS!  :laugh:

I made the changes you suggested and it works for me too.


Thank you very much, David!  :D
My Extensions: JM-Recommend, JM-Credits, JM-Link Us (for J! 1.0.x). Find them in the 3rd Party Extensions Forum.
Joomla test installation: www.poraqui.net/joomla  User: test  Password: test
elmoch
Joomla! Engineer
Joomla! Engineer
 
Posts: 410
Joined: Fri Aug 26, 2005 10:13 pm
Location: Spain

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby FluidDruid23 on Fri Apr 28, 2006 7:32 pm

Hi!

Nice little module.  :)

I had it working great on my site, then I guess I must have changed something because now I only get the domain name recommended and not the full link to the page, which I was getting previously...

Site is http://www.ttmygo.co.uk - once past the first page, you can see the Recommend button bottom right.

Help?

Matt
FluidDruid23
purpleplanet - Software Solutions :: Custom Joomla Development at http://www.purpleplanet.com :: Free Quotes, Excellent Fresh Designs :: 10% Discount When You Quote "JoomForum08"
User avatar
FluidDruid23
Joomla! Enthusiast
Joomla! Enthusiast
 
Posts: 107
Joined: Mon Mar 13, 2006 1:36 pm

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby elmoch on Sat Apr 29, 2006 2:49 am

FluidDruid23 wrote:Hi!

Nice little module.  :)

I had it working great on my site, then I guess I must have changed something because now I only get the domain name recommended and not the full link to the page, which I was getting previously...

Site is http://www.ttmygo.co.uk - once past the first page, you can see the Recommend button bottom right.

Help?

Matt
FluidDruid23


Hello Mat,

I visited your site with three different browsers (IE 6.0, FF 1.5 and Opera 8.5). Guess which one failed to process the form.
I know it's quite a difficult question  :laugh: so I will tell you: The King of Non-Standards>:(

That browser doesn't act always as expected. In my test installation, for example, when you click on Recommend this page you get the page you are in rendered again in the pop-up window, instead of the form. Why?  ???

I guess this could be solved using a Javascript script similar to the one used in the Bookmark Us module by kabam, from which I borrowed some code.
Unfortunately I don't have much time these days, so if you could have a look at both modules, you may come to a solution.
If you manage to make it work with you know who please share your findings here.

Thanks for your interest.  :)
My Extensions: JM-Recommend, JM-Credits, JM-Link Us (for J! 1.0.x). Find them in the 3rd Party Extensions Forum.
Joomla test installation: www.poraqui.net/joomla  User: test  Password: test
elmoch
Joomla! Engineer
Joomla! Engineer
 
Posts: 410
Joined: Fri Aug 26, 2005 10:13 pm
Location: Spain

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby PortaBle on Wed May 10, 2006 9:49 am

Hi! This might be just what I´m looking for.. Does the module store the recommendations into a database to compare for possible duplicates?
PortaBle
Joomla! Fledgling
Joomla! Fledgling
 
Posts: 1
Joined: Wed May 10, 2006 9:43 am

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby FluidDruid23 on Wed May 10, 2006 12:52 pm

PortaBle wrote:Hi! This might be just what I´m looking for.. Does the module store the recommendations into a database to compare for possible duplicates?


Easy answer...no ;)
purpleplanet - Software Solutions :: Custom Joomla Development at http://www.purpleplanet.com :: Free Quotes, Excellent Fresh Designs :: 10% Discount When You Quote "JoomForum08"
User avatar
FluidDruid23
Joomla! Enthusiast
Joomla! Enthusiast
 
Posts: 107
Joined: Mon Mar 13, 2006 1:36 pm

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby elmoch on Wed May 10, 2006 2:33 pm

Hi PortaBle,

Unforutnatey FluidDruid23 is right.
As stated in the first post, I'm not a programmer so I made something simple.  :-[
I might revise the code in the future but not for now, sorry.

Thank you for your interest, anyway!  :)
My Extensions: JM-Recommend, JM-Credits, JM-Link Us (for J! 1.0.x). Find them in the 3rd Party Extensions Forum.
Joomla test installation: www.poraqui.net/joomla  User: test  Password: test
elmoch
Joomla! Engineer
Joomla! Engineer
 
Posts: 410
Joined: Fri Aug 26, 2005 10:13 pm
Location: Spain

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby pages on Wed Jun 07, 2006 10:33 am

Hi,
Thanks for a great component & module.

Just wonderinh how easy/difficult it would be to add two more features:

(1) 2 more 'friend's email' . Sometimes someone wants to inform more than one person...

Any ideas or little help at least to set me off on the right firection as i can hopefully work on it but it might take me a while!

Thanks.
pages
Joomla! Intern
Joomla! Intern
 
Posts: 93
Joined: Fri Aug 19, 2005 5:13 pm

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby elmoch on Wed Jun 07, 2006 11:59 am

pages wrote:Hi,
Thanks for a great component & module.

Just wonderinh how easy/difficult it would be to add two more features:

(1) 2 more 'friend's email' . Sometimes someone wants to inform more than one person...

Any ideas or little help at least to set me off on the right firection as i can hopefully work on it but it might take me a while!

Thanks.



Thank you, pages.

I suppose it wouldn't be difficult to add such a fuctionality to Recommend Plus, but I wouldn't do it in order to avoid as much spam as possible.
You may search the forums or look at the code of similar extensions which offer that option, I guess...  :-\
If you are convinced to implement it, I would also recommend to use CAPTCHA at the same time. The procedure to do so is explained above by Nueaasimar.

Happy hacking!  :)
My Extensions: JM-Recommend, JM-Credits, JM-Link Us (for J! 1.0.x). Find them in the 3rd Party Extensions Forum.
Joomla test installation: www.poraqui.net/joomla  User: test  Password: test
elmoch
Joomla! Engineer
Joomla! Engineer
 
Posts: 410
Joined: Fri Aug 26, 2005 10:13 pm
Location: Spain

UPDATE: JM-Recommend Tell a Friend, Send page, Recommend to a Friend

Postby elmoch on Tue Jul 04, 2006 6:46 pm

Hi all,

Here's a beta version of my "tell a friend" package (component+module) now rebranded as JM-Recommend. Due to some issues arisen when the module was used with IE, links are now constructed and the form opened through JavaScript. Unfortunately this hasn't solved the problem.

Surprisingly, everything goes OK on my local installation (standalone LAMP on Win-XP) whichever browser I use (I tried FF 1.5, Opera 9.0 and IE 6.0).
However IE fails to work properly on my remote server (Apache+Linux):

When using IE the module works only if the location is http://www.foosite.tld/joomla/ not for other URL's of the home page, i.e. http://www.foosite.tld/joomla/component ... /Itemid,1/ and the like.
Nor with inner pages such as http://www.foosite.tld/joomla/component ... /Itemid,7/

In the URL of the pop-up window, IE 6.0 appends the URL stated in the window.open() command to the parent page's one. As a result, the referrer page is rendered in the new window. Why?  ???


I have tried almost anything without results. I guess it's not a template-related issued as I have tested several of them on both servers. It is always the same story - both the component and the module work locally when used with either FF, IE and Opera. But remotely IE doesn't act as expected when it comes to the module.  :'(

Apparently my local and remote server have nearly the same settings, so I must be overlooking something.  :-[
It would be great if some of you could install the package and check how the module behaves in your sites. Thanks for reporting any finding! :D


The files are available in the first post of this thread.
Last edited by elmoch on Tue Aug 22, 2006 11:46 am, edited 1 time in total.
My Extensions: JM-Recommend, JM-Credits, JM-Link Us (for J! 1.0.x). Find them in the 3rd Party Extensions Forum.
Joomla test installation: www.poraqui.net/joomla  User: test  Password: test
elmoch
Joomla! Engineer
Joomla! Engineer
 
Posts: 410
Joined: Fri Aug 26, 2005 10:13 pm
Location: Spain

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby maddunr on Wed Jul 05, 2006 6:57 pm

Hi Elmoch,

I just installed your beta version, and it still doesn't work with IE. You can see it in action here - http://www.neo-metro.com/new - at the bottom of every page.

Here are my observations:

1. Emailing from homepage - works with IE and FF
2. Emailing from content page - I get this error (You are not authorized to view this resource.You need to login.) with both IE and FF.
3. Emailing from virtuemart component - works with FF, doesn't work with IE.

Hope this helps.. and looking forward to a solution :)

- V
Last edited by Tonie on Sun Aug 06, 2006 7:22 pm, edited 1 time in total.
maddunr
Joomla! Engineer
Joomla! Engineer
 
Posts: 273
Joined: Thu Oct 06, 2005 4:43 pm

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby elmoch on Thu Jul 06, 2006 12:35 am

Hi maddunr,

Thank you for testing.
I couldn't find the component nor the module in the site you linked, so I couldn't check myself. It don't even seem to be a Joomla-based website. ???

Regarding your observations...
maddunr wrote:1. Emailing from homepage - works with IE and FF
2. Emailing from content page - I get this error (You are not authorized to view this resource.You need to login.) with both IE and FF.
3. Emailing from virtuemart component - works with FF, doesn't work with IE.


1. Did it work always or just when the location was http://www.neo-metro.com/ ?

2. It happened to me while testing and it was because of the anti-spoof/anti-spam checking code I borrowed from the newest core Content component. See jm-recommend.php, line # 91 and later. I commented out the new function

Code: Select all
// simple spoof check security
   #josSpoofCheck(1);


and added the old condition

Code: Select all
$validate = mosGetParam( $_POST, mosHash( 'validate' ), 0 );
   if (!$validate) {
      // probably a spoofing attack
      mosErrorAlert( _NOT_AUTH );
   }

That worked for me on Joomla! 1.0.10 with Secrurity Level 3 when visiting with FF and Opera.
Maybe you can play with that part of the code...

3. This feature was requested months ago in their official forum, but there were no answers. I don't know if it's been finally implemented and I'm afraid that's a too complicated application for me. Sorry.  :-[

Thanks again for your try, maddunr.  :)
Regards.
My Extensions: JM-Recommend, JM-Credits, JM-Link Us (for J! 1.0.x). Find them in the 3rd Party Extensions Forum.
Joomla test installation: www.poraqui.net/joomla  User: test  Password: test
elmoch
Joomla! Engineer
Joomla! Engineer
 
Posts: 410
Joined: Fri Aug 26, 2005 10:13 pm
Location: Spain

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby maddunr on Thu Jul 06, 2006 5:49 am

oops! :o sorry, the website's supposed to be http://www.neo-metro.com/new .. it is almost set for launching.

1. it always works with FF, but in IE, it works only when the  url is like above. if i click on HOME on the mainmenu (ie go to http://www.neo-metro.com/new/component/ ... /Itemid,1/), then clicking on email this page just brings up the website in the new window as well)

2. i'll try playing with your code. but i am afraid i am not too good at coding :)

3. basically, your component works with VM when using FF. it is only with IE that I am having problems.. so, I doubt if it is an issue with your knowledge of VM.

hope this helps,
-V
maddunr
Joomla! Engineer
Joomla! Engineer
 
Posts: 273
Joined: Thu Oct 06, 2005 4:43 pm

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby elmoch on Thu Jul 06, 2006 11:38 am

Thanks for your feedback, maddunr. Nice site, BTW :)

That's more or less the same behaviour as in my site.
I visited yours with IE 6, FF 1.5 and Opera 9. Here are the results I got on Wednesday, July 06, 2006, 01:15 PM [UTC +1]

1. Emailing from homepage.
FF and Opera OK, IE6 KO in the same cases you mentioned.
2. Emailing from content page (http://www.neo-metro.com/new/content/view/5/179/)
Opera: You are not authorized to view this resource.
FF: Worked OK.
IE: Failed as usual.

3. Emailing from virtuemart component ( http://www.neo-metro.com/new/component/ ... temid,104/)
Also FF and Opera OK, IE6 KO

I think I had better ask in the developer forum. If I ever get a solution, I'll report it here and of course update the package.  :-\
Thanks for all your help and interest, maddunr.  :)

PS. Did the original Recommend Plus work in your site? Did you use it?
My Extensions: JM-Recommend, JM-Credits, JM-Link Us (for J! 1.0.x). Find them in the 3rd Party Extensions Forum.
Joomla test installation: www.poraqui.net/joomla  User: test  Password: test
elmoch
Joomla! Engineer
Joomla! Engineer
 
Posts: 410
Joined: Fri Aug 26, 2005 10:13 pm
Location: Spain

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby maddunr on Thu Jul 06, 2006 3:58 pm

elmoch,

yeah, the original recommend plus did work similarly on my site. i will try asking some developers and see if they know anything.

thanks for your compliments :)

- V
maddunr
Joomla! Engineer
Joomla! Engineer
 
Posts: 273
Joined: Thu Oct 06, 2005 4:43 pm

Re: Tell a Friend, Send page, Recommend to a Friend. Site + current page

Postby elmoch on Thu Jul 06, 2006 11:58 pm

maddunr,

I just asked for advice in the developers forum. I hope someone can help us out.
And thank you for investigating on your side.  :)

Regards.
My Extensions: JM-Recommend, JM-Credits, JM-Link Us (for J! 1.0.x). Find them in the 3rd Party Extensions Forum.
Joomla test installation: www.poraqui.net/joomla  User: test  Password: test
elmoch
Joomla! Engineer
Joomla! Engineer
 
Posts: 410
Joined: Fri Aug 26, 2005 10:13 pm
Location: Spain

Next

Return to Modules