Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 6:31 am (All times are UTC )

 




Post new topic Reply to topic  [ 512 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 18  Next
Author Message
Posted: Wed Sep 28, 2005 10:13 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Sep 22, 2005 8:32 pm
Posts: 14
Location: Stoke On Trent (I know, Someone has to live there)




The userid is required in the function in order for it be placed into the link in the table row

The above hack creates the renew subscription link.

The link contains a item number which is the user id and Ive added  to the task variable a updatesub value.
This task variable will tell the next page to display the payment function.
Also i have added the user name. this will be required in the paypal function

in acctexp.php

below the following line

Code:
$expiration = trim( mosGetParam( $_REQUEST, 'expiration', '' ) );


add this

Code:
$idfromlogin = trim( mosGetParam( $_REQUEST, 'item_number', '' ) );
if (empty($idfromlogin ))
{
global $my;
$userid = ($my->id);
}
else
{
$userid =$idfromlogin;
$name=$user;
}


bit further on down is a case statement add this any where in it
Code:


case "updatesub":
   payForm( $option,$userid, $username, $name);
   break;


just before the case statement finishes

replace the default

Code:

default:
expired($option, $user, $expiration);
break;




with

Code:

default:
expired($option, $user, $expiration,$userid);
break;



just under the case statement is function called expired

Code:

function expired($option, $user, $expiration) {
HTML_frontEnd::expired($option, $user, $expiration);
}



replace this with

Code:
function expired($option, $user, $expiration,$userid) {
HTML_frontEnd::expired($option, $user, $expiration,$userid);
}



you just adding in the userid


and thats it i think  :P

Ive tested it many times and it works well. i hope i haven't missed anything out. let me know you get any problems.


apologise if i haven't explained well

Last edited by funkymunky on Wed Sep 28, 2005 10:21 pm, edited 1 time in total.

Ok below is my hack to get a renew link to appear when a user has logged in when their account has expired. please excuse my convention of coding there is probably a better way of putting things I'm still a newbie to mambo and php right enough of the excuses. I used user id's in URL which is probably not a good way. would like to use sessions at a later date.

your gona need to change 3 files

login.validate.php can be found in the administrator/components/com_acctexp/includes
acctexp.php can be found in /components/com_acctexp
acctexp.html.php can be found in /components/com_acctexp

in login.validate.php
replace the mosredirect line with

mosRedirect( "index.php?option=com_acctexp&item_number=".$usr->id."&user=" . $username . "&expiration=" . strftime(_ACCT_DATE_FORMAT, $expstamp));

this is adding a user id to the link so it can be used within the paypal payment function

in acctexp.html.php

add $userid to the function

Code:
function expired($option, $user, $expiration,$userid)


under the following table row

Code:
<tr>
   <td align="center">
   <?php echo _EXPIRED . $expiration; ?>
   </td>
        </tr>


add this row



Renew Subscription
Top
   
 
Posted: Wed Sep 28, 2005 10:15 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Sep 22, 2005 8:32 pm
Posts: 14
Location: Stoke On Trent (I know, Someone has to live there)
sorry about the line wraps if i placed the code within code tags you had a long horizontal scroll :P


Last edited by funkymunky on Wed Sep 28, 2005 10:23 pm, edited 1 time in total.

Top
   
 
Posted: Fri Sep 30, 2005 1:55 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Tue Aug 23, 2005 4:34 pm
Posts: 210
Location: Mt. Juliet, Tennessee
OK!

I have it working for me with one exception. I am not able to update the "mos_core_acl_groups_aro_map" for the user. Here is the code I have for it. Could anyone help?

Code:
   //GET ARO ID
   $q2 = "SELECT aro_id FROM #__core_acl_aro WHERE value='$my->id' ";
   $database->setQuery($q2);
   $database->query();
   $aro = $db->p("aro_id");
   
   //UPDATE ARO ID
   $q3 = "UPDATE #__core_acl_groups_aro_map SET group_id='19' WHERE group_id='18' AND aro_id='$aro' ";
   $database->setQuery($q3);
   $database->query();


Thanks,
Chuck

_________________
http://www.nashville-webdesign.com - Nashville Web Design


Top
  E-mail  
 
Posted: Fri Sep 30, 2005 2:14 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Tue Aug 23, 2005 4:34 pm
Posts: 210
Location: Mt. Juliet, Tennessee
I've got it to work. I changed the previous to:

Code:
   //GET ARO ID
   $q2 = "SELECT aro_id FROM #__core_acl_aro WHERE value='$my->id' ";
   $database->setQuery($q2);
   $database->query();
   $aro = $database->loadResult();
   
   //UPDATE ARO ID
   $q3 = "UPDATE #__core_acl_groups_aro_map SET group_id='19' WHERE group_id='18' AND aro_id='$aro' ";
   $database->setQuery($q3);
   $database->query();

_________________
http://www.nashville-webdesign.com - Nashville Web Design


Top
  E-mail  
 
Posted: Sat Oct 01, 2005 1:12 am 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Tue Aug 23, 2005 9:45 am
Posts: 629
Location: La Grande, Oregon
Ok, I am starting to get confused.  Also, with my non-technical knowledge of coding, I am unsure what is really going on.  I know funkymunky is working on Account Expiration and Chuck is working on the phpShop. 

Would it be too much to ask if you both could make one post each (when you are finished) of what you have hacked and what it does.  They both sound like great hacks, but I am wondering if the Account Expiration hack that you have been working on does what I am thinking it does, but I just can't be sure.  And I hope to hear more from you Chuck, because an integration with phpShop would be ideal for us ecommerce guys. 

I hope I am not asking for too much, I just want to take advantage of what is going on and learn more.  Thanks you guys for working so hard.

_________________
From the beginning...


Top
   
 
Posted: Tue Oct 04, 2005 2:35 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Oct 04, 2005 1:51 am
Posts: 22
good component  provided by AEC helder and contribs funkymunky, scubaguy and others.

After the user pay either at begiinning or thru upgrade button, does he have unlimited access to other components or modules?  Should development and functionality be extended to pay per usage of other components?

Community Builder RC2 and Account Expiration Control can be a powerful combination!

Darly


Top
   
 
Posted: Tue Oct 04, 2005 2:51 am 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Tue Aug 23, 2005 9:45 am
Posts: 629
Location: La Grande, Oregon
I'm glad I started this thread  :D

_________________
From the beginning...


Top
   
 
Posted: Tue Oct 04, 2005 4:15 am 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Tue Aug 23, 2005 2:19 pm
Posts: 93
charlwillia6 wrote:
I'm glad I started this thread  :D


hey charl, Im glad you started it too :D

btw funkymunky .. still havent tested your new hack .... ive have no time right now due to distracting projects hehe ... but i guess if it works for you it'll work on mine as well so cheers for your contribution

bedlam

_________________
Joomla! - theultraelectromagnetic CMS!


Top
  E-mail  
 
Posted: Tue Oct 04, 2005 7:30 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Oct 04, 2005 1:51 am
Posts: 22
also glad that charlwillia6 started thread!

Tested Account Expiration funkymonky hack and works nicely, I expired one user and next time that user login, it displayed message and button to Renew subscription thru paypal plan setup. well done!

now we need a button to Upgrade existing subscriptions?
Suggested Subscription Plans:
- Free
- Silver
- Gold

Darly


Top
   
 
Posted: Tue Oct 04, 2005 8:09 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Sep 22, 2005 8:32 pm
Posts: 14
Location: Stoke On Trent (I know, Someone has to live there)
i have created that button too but it needs testing. the button appears in the usermenu all the time and they can view the subscription page when they click it. I need to test it to make sure it is working properly.

will keep ya posted


Top
   
 
Posted: Tue Oct 04, 2005 8:27 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Sep 22, 2005 8:32 pm
Posts: 14
Location: Stoke On Trent (I know, Someone has to live there)
coupet wrote:
also glad that charlwillia6 started thread!

Tested Account Expiration funkymonky hack and works nicely, I expired one user and next time that user login, it displayed message and button to Renew subscription thru paypal plan setup. well done!

now we need a button to Upgrade existing subscriptions?
Suggested Subscription Plans:
- Free
- Silver
- Gold

Darly



Glad it worked PHHHHEEEEEEEEEEEEEW!


Top
   
 
Posted: Tue Oct 04, 2005 8:31 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Fri Aug 19, 2005 2:37 am
Posts: 270
Location: Milwaukee, WI
To give my users the upgrade option I modified the "function expired" in acctexp.html.php and included the payForm function.  I also added membership status messages based on the user's Group ID (gid) and for those members that have been excluded.  Everyone else will have their current expiration date displayed or the Expired message.  I then linked to the the page using "index.php?option=com_acctexp&Itemid=167"

Code:
   function expired($option, $user, $expiration) {
global $database, $my;

         $query2 = "SELECT expiration FROM #__acctexp WHERE userid=$my->id";
         $expiration2 = null;
         $database->setQuery( $query2 );
         $expiration2 = $database->loadResult();

         $query3 = "SELECT gid FROM #__users WHERE id=$my->id";
         $expiration3 = null;
         $database->setQuery( $query3 );
         $gid = $database->loadResult();

      ?>
      <table width="590" cellspacing="0" cellpadding="0" border="0">
      <tr>
      <td><br><br>
      </td>
      </tr>
      <tr>
      <td align="center">
      <strong>
      <?php if ($expiration2=='' && $gid >= 20) {
         echo _EXPIRED_TITLE2;
      }
if ($expiration) {
      echo _EXPIRED_TITLE;
      } ?>
      </strong>
      </td>
      </tr>
      <tr>
      <td><br><br>
      </td>
      </tr>
      <tr>
      <td align="center">
      <?php if ($expiration2=='' && $gid >= 20) {
    echo _DEAR . $my->username . ",";
      }
if ($expiration) {
      echo _DEAR . $user . ",";
      } ?>
      </td>
      </tr>
      <tr>
      <td align="center">
      <?php if ($expiration2=='' && $gid >= 20) {
      echo _EXPIRED2 . _EXCLUDED;
      }
if ($expiration) {
      echo _EXPIRED . $expiration;
      } ?>
      </td>
      </tr>
<tr><td>
<?php payForm($option, $userid, $username, $name); ?>
</td></tr>
      </table>
      <?php
   }


_________________
Web Geek Cafe - development and Joomla coaching webgeekcafe.org
YourTribe.com - group social events - yourtribe.com


Top
  E-mail  
 
Posted: Tue Oct 04, 2005 9:18 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Oct 04, 2005 1:51 am
Posts: 22
well! we might need to combine hacks to function expired in acctexp.html.php AEC
Renew button hack provided by funkymunky
Status & Upgrade button provided by scubaguy

funkymunky
function expired($option, $user, $expiration,$userid)

scubaguy
function expired($option, $user, $expiration)

Darly


Top
   
 
Posted: Tue Oct 04, 2005 10:11 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Oct 04, 2005 1:51 am
Posts: 22
Hacks provided extend AEC features as follows:
1 - CB integration (scubaguy)
2.- Exclusion list issue (funkymunky)
3.- Renew button (funkymunky)
4.- User Status (scubaguy)
5.- Upgrade button (scubaguy)

Implemented hacks 1, 2 & 3 excellent!
Would like to implement hacks 4 & 5 but do not want to lose hack 3.

Darly


Top
   
 
Posted: Wed Oct 05, 2005 2:11 am 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Tue Aug 23, 2005 2:19 pm
Posts: 93
coupet wrote:
Hacks provided extend AEC features as follows:
1 - CB integration (scubaguy)
2.- Exclusion list issue (funkymunky)
3.- Renew button (funkymunky)
4.- User Status (scubaguy)
5.- Upgrade button (scubaguy)

Implemented hacks 1, 2 & 3 excellent!
Would like to implement hacks 4 & 5 but do not want to lose hack 3.

Darly



Thanks for organizing the hacks coupet ... it will be very helpful :)

This should make things easier for Helder and the crew on how to implement them on AEC

Thanks Scubaguy and Funkymunky for such excellent hacks! Keep it up ;)

bedlam

_________________
Joomla! - theultraelectromagnetic CMS!


Top
  E-mail  
 
Posted: Wed Oct 05, 2005 6:06 am 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Tue Aug 23, 2005 6:41 am
Posts: 519
Hey!

Awesome!!!!!

This is all I needed!  Thanks thank you thankyou!  I love it!

Has there been any updates to this where all these hacks are included in the files?  I have com_acctexp031.zip

Is there a newer version with the above hacks included as options so I know its the latest?

Thanks!

Ryan

_________________
TY2U.com Designs http://www.ty2u.com - Free Joomla! Templates


Top
  E-mail  
 
Posted: Wed Oct 05, 2005 9:59 am 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Thu Aug 18, 2005 12:22 pm
Posts: 933
Location: Ballarat, Australia
Hey you guys any chance of posting this as a project on The Forge?

I know it's not ongoing but if it was put together as a package it would be of more use to the majority who may not bother to wade through the conversation here.

_________________
We cannot become what we need to be ... by remaining what we are


Top
   
 
Posted: Wed Oct 05, 2005 1:20 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Fri Aug 19, 2005 2:37 am
Posts: 270
Location: Milwaukee, WI
I have some time this week.  I'll try to put a complete package together.

_________________
Web Geek Cafe - development and Joomla coaching webgeekcafe.org
YourTribe.com - group social events - yourtribe.com


Top
  E-mail  
 
Posted: Thu Oct 06, 2005 3:39 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Sun Aug 21, 2005 2:57 pm
Posts: 1366
Location: Colorado, USA
I've been lurking this thread for a couple of weeks and finally have something to say  :laugh:

The direction here seems to be towards more and better ways of people paying and paying again which is appropriate considering the thread title, but I was hoping someone might be able to suggest the best way to manage inactive users in a free environment.

What I'd like is to maintain the number of active users around 10,000 so I don't run into the known backend issues that come with large numbers of users.  I think I could maintain a reasonable number of active users if I had a simple component that would

1) expire registered users after a month (the vast majority of my visitors would be done using the site in that timeframe)
2) never expire any authors or admins (there are several hundred and they're dynamic so I don't want to have to maintain an exclusion list I just want to exclude the groups)
3) allow registered users to reactivate their account by clicking a button (but not paying).  There would probably only be a hundred or so a month but it would still be nice to automate it.
4) allow me to e-mail inactive users in case there was some change that might induce them to reactivate.

I'd like to know if there is a good solution for this available that handles it in such a way as to prevent the known backend issues with large numbers of users. I guess that would mean actually moving the inactive users into some sort of database archive rather than just flagging the accounts?

I'd really appreciate some sage advise here because I'm trying to avoid future issues and I believe it will require some pretty intimate knowledge of the component to predict how it will act 50k users from now. 

Thanks in advance

_________________
¡Pura Vida!
Ray,
joomla in testing at Costa Rica Travel: http://costaricamap.net
http://costa-rica-guide.com


Top
  E-mail  
 
Posted: Thu Oct 06, 2005 5:39 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Tue Aug 23, 2005 4:34 pm
Posts: 210
Location: Mt. Juliet, Tennessee
Your best bet may be to make users inactive "if" they have not signed on in 30 days.

Chuck

_________________
http://www.nashville-webdesign.com - Nashville Web Design


Top
  E-mail  
 
Posted: Thu Oct 06, 2005 6:25 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Tue Aug 23, 2005 6:41 am
Posts: 519
I personally dont see how it could be hard to move the user to a seperate table in the database, that way you can keep sending them email reminders to come sign up and pay you more money until they come to your site and delete themselves, or you could put a link in the email that does that.

That would be a nice addon! 

In the expire function, if the user is being changed from paying subscriber to dormant user move it to a different table.  Then another function in the addon would access that table and do all the same things as the regular users, but seperately, including sending mass emails, and the ability to move them back to the subscribers list if they decide to pay again.

I think things are going in the right direction so far, its just a matter of time :)

Thank you for helping us out!!!!

_________________
TY2U.com Designs http://www.ty2u.com - Free Joomla! Templates


Top
  E-mail  
 
Posted: Fri Oct 07, 2005 12:57 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Oct 04, 2005 1:51 am
Posts: 22
Also, now that we have 3 excellent active developers and a few other good contributors.

Suggest establish an AEC roadmap with the following:
- short term features (now)
- medium term capabilities (3 months)
- long term goal (6 months)
- other (anytime)

Features request can be discussed then reviewed by Development team.

Thanks, Darly


Top
   
 
Posted: Sun Oct 09, 2005 11:42 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Aug 21, 2005 8:34 pm
Posts: 28
I've been following this thread for a while, trying to get the courage to try these hacks  :-[ I have abslutley no knowledge of php, so it was a little intimidating at first. I decided I'd learn my way around *ambo and CB first. Now I'm ready to begin (I hope) and I've run into a problem. I installed the acctexp component, and made the change to mambo.php as instructed in scusbaguy's original hack at mambojoe.com. So far so good. Now I try to get the instructions.txt file and the comprofiler.php files and they're not there! I get a page can't be displayed error each time I try to access those files, so I can't go any further.

Can anyone help me out by either posting the original files, or posting instructions as to what I have to change here?

This is the last element I need to implement in order to launch my new site. Thanks in advance for your assistance.

Deb


Top
   
 
Posted: Mon Oct 10, 2005 1:49 am 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Aug 18, 2005 2:09 am
Posts: 2819
Location: California
helder wrote:
Hey funkymunky,

thanks for your hack, I'll merge it to next release. By the way, I am looking for a new developer for the project to maintain a possible branch of component to work integrated with CB. After all, open source is colaborative work, right? This component started as a little "learning exercise", but now I have a lot of users interested on new features, integration with other components, and some bugs to fix. My time is very restricted. I need help  :o


Helder,

What do you think about adding scubaguy and funkymunkey as devs on the Account Expiration Control Component?
http://developer.joomla.org/sf/sfmain/d ... accountexp
That way all their modifications could be merged with the existing code.

KM

_________________

██ AllVideos Reloaded extension Help forum

http://joomlacode.org/gf/project/allvideos15/forum/?action=ForumBrowse&forum_id=7581


Top
   
 
Posted: Tue Oct 11, 2005 2:55 am 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Tue Aug 23, 2005 2:19 pm
Posts: 93
hello, :)

any news on the upgrade button and user status working on funkymunky's hacks? .... i think this is all that is missing with a true basic payment options .... hope scubaguy had a chance to make the package.

anyway .. keep up the good work guys!

cheers!

_________________
Joomla! - theultraelectromagnetic CMS!


Top
  E-mail  
 
Posted: Wed Oct 12, 2005 4:05 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Sep 02, 2005 3:41 am
Posts: 21
  I have been looking around for a solution like this for a while now. For some reason, I was looking in the wrong places. Thank you for all the contributions on this thread. 


Top
  E-mail  
 
Posted: Sat Oct 15, 2005 2:44 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Mon Sep 12, 2005 8:31 pm
Posts: 102
Location: Helsinki
Hey guys!

What you've done is really great!!!  :D thanks so much for your effort!

I was wondering if anybody could somehow make a summary of what needs to be done to get all these things to work (and in which order). Its a little bit confusing in all these threads.  ???

Maybe a simple list with a link to the correct section of this conversation.

Would be much appreciated by me and I'm sure many others.

Thanks

BFC

_________________
Check out http://www.bluefightingcat.com!!


Top
   
 
Posted: Tue Oct 18, 2005 5:10 am 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Tue Aug 23, 2005 2:19 pm
Posts: 93
hi chuck truckk

i was wondering whats your hack for? is this something to do with funkymunky's hack or your own hack for phpshop?

just a bit confused :)

thanks




ChuckTrukk wrote:
I've got it to work. I changed the previous to:

Code:
   //GET ARO ID
   $q2 = "SELECT aro_id FROM #__core_acl_aro WHERE value='$my->id' ";
   $database->setQuery($q2);
   $database->query();
   $aro = $database->loadResult();
   
   //UPDATE ARO ID
   $q3 = "UPDATE #__core_acl_groups_aro_map SET group_id='19' WHERE group_id='18' AND aro_id='$aro' ";
   $database->setQuery($q3);
   $database->query();


_________________
Joomla! - theultraelectromagnetic CMS!


Last edited by bedlam on Tue Oct 18, 2005 5:18 am, edited 1 time in total.

Top
  E-mail  
 
Posted: Tue Oct 18, 2005 5:22 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Tue Aug 23, 2005 4:34 pm
Posts: 210
Location: Mt. Juliet, Tennessee
bedlam,

Sorry for leaving that post hanging. My client needed 1)signups in CB, 2)payment through mambo-phpshop [now called virtuemart]. Then users could only read the website articles if they had paid via virtuemart.

Problem was 1) user signed up through CB- so everyone was "registered" before payment.
2) User had to be active in order to purchase through virtuemart.

So this script "//GET ARO ID...." was to upgrade the users to "Author" once payment via virtuemart was successful. If you use AcctExp, you could upgrade the user to any of the new groups you created.

I've been really busy with some clients, but I will (promise) post on how I got CB and virtuemart working together when I get a chance (I'm happy Im busy tho)!

Chuck

_________________
http://www.nashville-webdesign.com - Nashville Web Design


Top
  E-mail  
 
Posted: Tue Oct 18, 2005 5:30 am 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Tue Aug 23, 2005 2:19 pm
Posts: 93
okie dokie chuck .... got it! :)

thanks for the quick reply ....

hope you can release your work too .... whenever you'll be free that is ... take your time, cheers!

;)

_________________
Joomla! - theultraelectromagnetic CMS!


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 512 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 18  Next

Quick reply

 



Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group