Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-31-2010, 11:12 AM   PM User | #1
Byronwells
Regular Coder

 
Join Date: Dec 2009
Posts: 240
Thanks: 7
Thanked 0 Times in 0 Posts
Byronwells can only hope to improve
Your Thoughts Please

Alright guys

At the moment I am toying between two ideas, and I was just wondering if I could get your thoughts please..

At the moment I am using a membership script that does not have a date feature.. What I mean, is when I add a new product to the site, I would like to choose the date for it to appear, whether that be a date that has already gone, now, or in the future.. Just like you can do on a wordpress blog..

I know with a wordpress blog, when you go and add a blog post, you get three form selectors to choose, year, month, day from and then link it to on field on the database

But I am thinknig to myself wouldnt that require a lot of php code? I.e for it to reckonise the exact days in a month.. To reckonise what day we are currently on so that we can publish it now?

My other idea is to use a simple calender.. But at the moment a lot of them come with an event planner, which I dont need. I just want the date to be link to the product that I am adding...

Then at later stage when I go back and edit the product it will show me the date that I have chosen

What is best to use please?? Or rather what is simple to work out and to code...
Byronwells is offline   Reply With Quote
Old 02-01-2010, 08:42 AM   PM User | #2
jenius
Regular Coder

 
Join Date: Jan 2010
Posts: 137
Thanks: 3
Thanked 10 Times in 10 Posts
jenius is an unknown quantity at this point
Honestly? I would advise not bothering with wordpress and trying out Drupal. It's preferred by most good web developers, and allows you very precise control over those types of things with the minimal amount of php knowledge possible. In addition, it has a very large community, and lots of documentation and support.

I don't know about wordpress (it might be similar), but in drupal it would be easy to insert a simple print php statement in your node template (html) to print the date, somewhere along the lines of...

Code:
<?php print ($date) ?>
...because they already have most of the common variables PHP coded out for you in the back end.

If you are using neither, and you are just trying to straight up print the date using PHP, you can play around with this code...

Code:
<?php

// Prints something like January 24, 2005

echo date("F j, Y");

// Outputs something like Monday, February 17th, 2005

echo date("l, F jS, Y");

// Outputs date in format of 10/24/2005 for October 24th 2005

echo date("m/d/Y");

?>
jenius is offline   Reply With Quote
Old 02-01-2010, 11:27 AM   PM User | #3
Byronwells
Regular Coder

 
Join Date: Dec 2009
Posts: 240
Thanks: 7
Thanked 0 Times in 0 Posts
Byronwells can only hope to improve
[QUOTE=jenius;917222]Honestly? I would advise not bothering with wordpress and trying out Drupal. It's preferred by most good web developers, and allows you very precise control over those types of things with the minimal amount of php knowledge possible. In addition, it has a very large community, and lots of documentation and support.

I don't know about wordpress (it might be similar), but in drupal it would be easy to insert a simple print php statement in your node template (html) to print the date, somewhere along the lines of...

Code:
<?php print ($date) ?>
Never said I was using wordpress.. I said I wanted something similiar to how it the date selection part looks on a wordpress blog
Byronwells is offline   Reply With Quote
Old 02-01-2010, 01:20 PM   PM User | #4
TheAbMan
New to the CF scene

 
Join Date: Feb 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
TheAbMan is an unknown quantity at this point
I would go with the calendar. You should be able to find one without the planner piece.
TheAbMan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:56 PM.


Advertisement
Log in to turn off these ads.