Part of the EllisLab Network
pMachine Pro has been replaced by ExpressionEngine, our full featured web publishing solution. Please consider upgrading.
You can download pMachine Pro here: Download pMachine Pro  |  Download Language Packs
   
 
headlines tag future dates
Posted: 29 May 2004 10:36 AM   [ Ignore ]  
Summer Student
Total Posts:  6
Joined  2003-06-02

I saw a post here before about how to make a specific weblog display future dates with the multi entries tag by adding the following code to the weblog.fns.php file (just before the line that reads //Main Query.  I was wondering if anyone knew of a way to implement this for the headlines tag?

// SHOW Test

if ($weblog == “test")
{
$sql = “select * from $db_weblog
where weblog = ‘$weblog’
and status = ‘open’
and preview != ‘1’
order by t_stamp desc”;

}

// End SHOW Test

Profile
 
 
Posted: 01 June 2004 01:37 AM   [ Ignore ]   [ # 1 ]  
Lab Assistant
RankRank
Total Posts:  234
Joined  2004-02-27

Hey raj, I am looking for the same thing. I know something like this in Michael.be’s Function Customizer, but I can’t get FC to install properly, and just need a hack to get an events calendar going for now.

When I install FC I get that problem of it not working at all unless I put it in a subdirectory.

-- Rob

Profile
 
 
Posted: 01 June 2004 11:32 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  6
Joined  2003-06-02

do you mean, putting the files you would normally put in the root dir into a subdirectory?  This future date thing is the one thing holding me back from finishing a site.  I guess things have kind of died down around here since expression engine was released.

Profile
 
 
Posted: 01 June 2004 01:45 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
RankRank
Total Posts:  234
Joined  2004-02-27

Yes it’s the same with me - one fix to weblog_headlines and I can do what my heart desires (which is to launch this site I’m working on.)

As far as weblog_headlines goes, my planned work-around now is not to use them. Right now, I can’t see an obstacle with just putting ordinary weblog entries in a list but displaying only the date/title… That’s my experiment after work today. Maybe I’m just not remembering if this is an enormous hassle.

You’ve got it right - I’ve put the files that go into a root directory into a subdirectory. I can’t be sure, but I think Michel.Be designed Function Customizer to work with the traditional structure of the default pMachine setup; ie. with weblog.php, more.php, trackback.php, etc. all in one directory.

Things *seem* to be working OK, this way, but I can’t be sure. I guess nothing is really holding one back from putting everything in the root directory when one has a pMachine site. I guess I like people being able to access parts through folders and not having to remember extensions, eg. http://www.sitename.org/subscribe/ .

I asked Michel about this and got “next version, next version” answers—I *really* hate to press him for requests as he really seemed to really bust his chops making FC in Dec./Jan., I wouldn’t blame him if he’s burnt out on working on it. People also seemed to get very demanding of his software (and him!). He says he’s planning a new release, though, and this one will work with any directory structure.

Rob

Profile
 
 
Posted: 01 June 2004 01:46 PM   [ Ignore ]   [ # 4 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  2002-06-19

Try this:

1. Open pm/lib/weblog.fns.php for editing.

2. Look around line 2099 and you’ll see this code:

$sql = "select * from $db_weblog
            where preview = '0'
            and status = 'open'
            and t_stamp < '$newtime'
            and x_stamp >= '$newtime' "
;

3. Try changing that to this:

$sql = "select * from $db_weblog
            where preview = '0'
            and status = 'open'
            and x_stamp >= '$newtime' "
;

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 01 June 2004 02:59 PM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  6
Joined  2003-06-02

thankyou so much, this was exactly what I needed.

Profile
 
 
Posted: 01 June 2004 09:32 PM   [ Ignore ]   [ # 6 ]  
Lab Assistant
RankRank
Total Posts:  234
Joined  2004-02-27

YESSSSS!!!

That did it for me too.

I thought I’d eliminated all the “and t_stamp < ‘$newtime’” constructions, but I think I missed one. Thank you again Chris Curtis!

Rob

Profile
 
 
Posted: 02 June 2004 05:09 PM   [ Ignore ]   [ # 7 ]  
Summer Student
Total Posts:  6
Joined  2003-06-02

well, it works well but unfortunately my next previous links are broken, the weblog_entries and weblog_entries_limit tags show all entries for the weblog that I have future dates in (the other weblogs I have work fine with next/previous links).

Profile
 
 
Posted: 16 June 2004 05:59 PM   [ Ignore ]   [ # 8 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  211
Joined  2002-07-30

Is there a way to limit this to only certain weblogs with an if statement?

 Signature 

31Three - Creative Services for the Design-Challenged Developer

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 233, on December 18, 2007 12:04 AM
Total Registered Members: 60971 Total Logged-in Users: 0
Total Topics: 73683 Total Anonymous Users: 0
Total Replies: 397485 Total Guests: 28
Total Posts: 471168    
Members ( View Memberlist )
Active Members: