Problems, need help? Have a tip or advice? Post it here.
14 posts Page 1 of 2
Okay in my members side of the section i have a editable that is a dropdown with YES and No. This then allows users to then post things via a databound.

Now if set to yes the user can make posts. However if set to no then they cant. What i want to-do is have this that expires after a certain date. So lets say user "couch" is set to YES however have entered a expire date of 15/11/2015 this will then change to NO.

I basically want to have a editable that will expire like a subscription.
SimonRLM wrote: Okay in my members side of the section i have a editable that is a dropdown with YES and No. This then allows users to then post things via a databound.

Now if set to yes the user can make posts. However if set to no then they cant. What i want to-do is have this that expires after a certain date. So lets say user "couch" is set to YES however have entered a expire date of 15/11/2015 this will then change to NO.

I basically want to have a editable that will expire like a subscription.


Hi SimonRLM!

Actually, i need something like this, but still stuck. So, i continue the progress to work on another section of mine.

I was got an idea to give members template an "expired date" editable field (maybe datepicker). so when they send me monthly payment to get a premium features (post editing in my case), i will set the expired date on the field, and give the premium page a conditional tag like "if members expired date equal cms:date = send back to previous page, or give an error msg, or someth and someth".

But still got a problem, the user can access the premium page next day after the expired date that i set :lol:
As soon as possible!

Touch me up : abada[dot]zulma[at]gmail[dot]com
@GoingMarryAsap
But still got a problem, the user can access the premium page next day after the expired date that i set :lol:

I think there must me some logical error in the coding.
Can I take a look at this issue first-hand? If we can rectify it, it will also solve Simon's problem.
That makes sense. I'm currently using then if tag to support the yes and no custom field. However this would make more sense to use the expired date.

Once the code has been looked at and corrected and working would you be able to post it up so this could solve my problem too.

Thanks, Simon.
KK wrote: @GoingMarryAsap
But still got a problem, the user can access the premium page next day after the expired date that i set :lol:

I think there must me some logical error in the coding.
Can I take a look at this issue first-hand? If we can rectify it, it will also solve Simon's problem.


Hi KK!
Hi SimonRLM!

Sorry for late respon, the code is on my office pc.

Now im here at my office, so this is the code :

Code: Select all
<cms:pages masterpage='iklan.php' orderby='publish_date' order='desc' limit='6' paginate='1'>
   <div class="image">
      <cms:pages masterpage='members/index.php' id="<cms:show owner />">
         <cms:if end_date != "<cms:date format='Y-m-j' />">
            <figure class="ribbon">Premium</figure>
         <cms:else_if end_date = "<cms:date format='Y-m-j' />"/>
            <figure class="ribbon">Not Premium</figure>
         </cms:if>
      </cms:pages>
      <cms:set has_foto_iklan1='0' 'global' />
      <cms:show_securefile 'foto_iklan1'>
         <cms:if file_is_image>
            <img alt="<cms:show k_page_title />" src="<cms:cloak_url link=file_id thumbnail='1' />">
            <cms:set has_foto_iklan1='1' 'global' />
         </cms:if>
      </cms:show_securefile>
      <cms:if "<cms:not has_foto_iklan1 />">
         <img alt="<cms:show k_page_title />" src="<cms:show k_site_link />assets/img/no-image.png">
      </cms:if>
   </div>
</cms:pages>



Like i said before, i have an editable region date picker named "end_date". That will handle the expired date. My problem is, when i set the end date before the <cms:date />, the site will show "Premium", and if the <cms:date /> greater than "end_date" it will show "Premium". But, if the "end_date" equal <cms:date />, it will show "Not Premium".

So, what i need is when the "end_date" equal or greater than <cms:date />, it always show "Not Premium", or in this case the user cant access the premium page, or cant do someth what we give it to the premium user. (In my case, the premium user have a ribbon tag & can edit post)

I still cant figure it out :lol: :lol:
As soon as possible!

Touch me up : abada[dot]zulma[at]gmail[dot]com
@GoingMarryAsap

The page you posted has gone missing apparently. :lol:


I'm currently using a custom editable called Traders

Code: Select all
<cms:editable 
  name="trade_publish"
  label="trade Publish"
  desc="Can this person Trade"
  opt_values=' No | Yes '
  opt_selected='No'
  type='dropdown'
 
/>


Now in there profile i'm editing them to YES if they can set this. Now on the pages i want to hide, or allow the members i use the if and else tag.


Code: Select all
<cms:if press_publish='Yes' >
Yes, you can post in here.
<cms:else />
Sorry, you cant post in here.
</cms:if>


Within that post i've made it logged-in only so cant be seen by none register users and used the code to get the members information from their index.php registered profile.

Code: Select all
<cms:pages masterpage=k_member_template id=k_member_id></cms:pages>



So i assume that yours could work the same way i have. My only issue is working the code out for above. Using the expired date instead of the dropdown yes or no.

edit
My understanding within that if tag i will need to get the current date and the expired date. So if the expired date is after the current date it'll use the else tag. Can you mock me anything up with that KK
Seems like pastebin send my code on space :lol:

Already edit my post above simon.
As soon as possible!

Touch me up : abada[dot]zulma[at]gmail[dot]com
Hi,

Have you sorted the code? or does it still need some attention?
SimonRLM wrote: Hi,

Have you sorted the code? or does it still need some attention?


The code still stuck simon.
If the date equal end_date, the user premium service end, but the next day the user get it again.

Or maybe, if we combine the expired date, and your on off switch, and after the expired date reach it limit, the on off switch automaticly to off. So to activate again, we need to switch it to on, and set the expired date again.

I need this system actualy, but still thinking how to reach it :lol:
As soon as possible!

Touch me up : abada[dot]zulma[at]gmail[dot]com
Hey,

i've never worked with expired dates and how they should run. I think KK should get us going with this once he has time to look at it. The only issue with the on and off editable would cause problems with large amounts of people. Rather than when someone buys a subscription and update the date so 1month after the current date would make it easier.

i think my way is floored somewhat due to the complex of what we wish to complete.
14 posts Page 1 of 2