Support Center

Knowledgebase
View categorized listing of all common frequently asked questions.
Video Tutorials
Create a Movie & TV Show review website.
Customize the jReviews themes.
Review user profiles with the Everywhere addon.
Forum
Community forum
Submit a Ticket
Use your client area email to access the ticket system.
Downloads
Guides, modules and more...
 
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 07, 2009, 05:23:31 PM
22782 Posts in 5218 Topics by 2974 Members
Latest Member: Vijitha
News: Do not post any jReviews files or large amounts of code in the forums please. Only template files and code are allowed.
 
jReviews Support Forum  |  jReviews 1.x  |  Tips & tricks  |  How to: edit the expired date publication from the front-end « previous next »
Pages: [1]
Author Topic: How to: edit the expired date publication from the front-end  (Read 802 times)
andreasa
Hero Member
*****
Offline Offline

Posts: 271



WWW
« on: April 20, 2007, 05:06:51 AM »

If you want do the possibility to your user to enter the expired date for their content you can do this:
Create a new data field called "end", with: required->yes:

Edit jreviews.php file

replace

Code:
if ( trim( $row->publish_down ) == 'Never' ) {
     $row->publish_down = $nullDate;
    }

with
Code:
$row->publish_down = mosGetParam($_POST,"jr_end");


and after

Code:
// Existing record
$row->modified = date( 'Y-m-d H:i:s' );
$row->modified_by = (int) $_POST['userid'];
add
Code:
$row->publish_down = mosGetParam($_POST,"jr_end");
All done!
So now the content insert from the front page will expire at the date insert.

Thank you to Alejandro for the constant excellent support!
Logged
gjoe
Newbie
*
Offline Offline

Posts: 18


.


WWW
« Reply #1 on: July 11, 2007, 09:51:22 AM »

You wrote: Create a new data field called "end", with: required->yes:
Stupid question:
What type field?
Date?Smiley
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8997


« Reply #2 on: July 11, 2007, 11:40:53 AM »

Yes, he meant date.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Pages: [1]
« previous next »
    Jump to: