Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[archived] smf_eventarticle
Notice: This thread is archived, this plugin is no longer available.
**********************************************************
This is a small evolution of the great rss_suparchive plugin by Rob Sable allowing you to view events/articles/etc. in archive list form using the rss_suparchive options, however this plugin only shows items from the current timestamp and on into the future, instead of using the default TXP way of only displaying articles from now into the past. I created this plugin to work with Marshall Potter’s mdp_calendar plugin for my Events Listings on my website, GuidetotheCity.biz.
To create the calendar page on my site I simply added mdp_calendar and placed smf_eventarticle with the following options:
form=“events_single”
section=“calendar”
dateformat=“F Y”
showsubdate=“1”
limit=“20”
If you look in the code (which I’ll continue to fine tune since there is a bit of redundancy in there), you’ll notice the all important change within the SQL query:
FROM: Posted < now()
TO: Posted >= now()
Offline
Re: [archived] smf_eventarticle
Sean – The ability to list future articles is a great idea and I’d gladly like to incorporate the change into the rss_suparchive.
I was wondering if your smf:doArticle tag is any different than the txp:doArticle tag?
Offline
Re: [archived] smf_eventarticle
txfrog, I followed over from our other thread. Looks good! I’ll be sure to try this one out soon. Thanks a bunch for all your work on this. :)
Offline
Re: [archived] smf_eventarticle
So this plugin will give you the feature of listing future events? I’m curious because my bands web site needs a way to post info on upcomming shows/gigs. Would this plugin be suitable for this?
So I tried installing smf_eventarticle with the txt file and i got the following script errors:
Warning: plugin_install(): open_basedir restriction in effect. File(/tmp/phpwxUL1k) is not within the allowed path(s): (/var/www/16stitches.com) in /var/www/16stitches.com/html/!16/textpattern/include/txp_plugin.php on line 136
Warning: plugin_install(/tmp/phpwxUL1k): failed to open stream: Operation not permitted in /var/www/16stitches.com/html/!16/textpattern/include/txp_plugin.php on line 136
Warning: plugin_install(): open_basedir restriction in effect. File(/tmp/phpwxUL1k) is not within the allowed path(s): (/var/www/16stitches.com) in /var/www/16stitches.com/html/!16/textpattern/include/txp_plugin.php on line 136
Warning: plugin_install(/tmp/phpwxUL1k): failed to open stream: Operation not permitted in /var/www/16stitches.com/html/!16/textpattern/include/txp_plugin.php on line 136
Warning: plugin_install(): Failed opening ‘/tmp/phpwxUL1k’ for inclusion (include_path=’.:/usr/share/pear’) in /var/www/16stitches.com/html/!16/textpattern/include/txp_plugin.php on line 136
—————————————-
what does this mean?
“You know you’ve achieved perfection in design, not
when you have nothing more to add, but when you have
nothing more to take away.” -Antoine de Saint-Exupery
Offline
Re: [archived] smf_eventarticle
FYI, the ability to list future articles is pretty easy to hack into the standard article tag (three lines added) and I’ve talked to Dean about including it in the distribution any time soon.
Who’s gonna textdrive you home tonight?
Offline
Re: [archived] smf_eventarticle
Sorry for not responding earlier work is kicking my butt this week, and taking care of my pregnant wife, while fun, is almost a full time job in itself :-)
Rob – I’d love to see this in rss_suparchive, then we can just trash my plug-in and all hail the great and powerful Rob ;-)
The doArticle is exactly the same, and for the life of me I can’t remember if there was a particular reason why I did it that way, but it worked and thats all that mattered at the time.
theturninggate – thank you, I love seeing a community that really supports a project like TXP.
t1m – that looks like the server couldn’t locate the file for upload once on the server… odd.
mamash – I agree, but using a plugin leaves less of a chance that someone might mess up their publish.php file. I really hope Dean implements future articles in 1.0
Offline
Re: [archived] smf_eventarticle
hi txfrog,
just wanted to say thank you for diligent application in releasing your plug. Am currently investigating RC3 and will then put it through its paces asap.
TXP Builders – finely-crafted code, design and txp
Offline
Re: [archived] smf_eventarticle
The new version of rss_suparchive has this incorporated. Good idea Sean.
Offline
Re: [archived] smf_eventarticle
> txfrog1999 wrote:
> t1m – that looks like the server couldn’t locate the file for upload once on the server… odd.
I get the same error previously stated above when i try to install the new pre rc3 rss_superarchives that wilshire has listed
I did notice that on line 136 there is the following code:
include $_FILES[‘theplugin’][‘tmp_name’];
Do you think this is all due to my half ass host i’m on? because the my host has the PHP on the server configured with options which make it impossible to use clean URLs; php was complied with —enable-discard-path options);
I’m guessing i should go with textdrive hosting or a better host, the only problem is my clients site is hosted with this horrible server configuration and i need to list future events ;o(
Any help would be appreciated a lot. thx
Last edited by t1m (2005-02-25 12:48:45)
“You know you’ve achieved perfection in design, not
when you have nothing more to add, but when you have
nothing more to take away.” -Antoine de Saint-Exupery
Offline
#10 2005-07-06 16:47:19
- squamosity
- New Member
- Registered: 2005-07-01
- Posts: 2
Re: [archived] smf_eventarticle
This is a great plugin to list events on your site. I needed a quick way to List events that span multiple days. Here is a hack to the plugin to return event dates as : Janurary 1, 2005 – January 5, 2005. I’m no crack programmer so If someone can see a better way, please improve this!
I’m using the custom_1 column in the database to store a duration value which will then add that value in days to the posted date and calculate a value for enddate.
(I hope this code comes across OK)
==========================================
Goto: admin>plugins>smf_eventarticle>edit>
1 – Find the Line:
$where = “status=4 $sections $categories $authors AND Posted >= NOW ORDER BY Posted ASC”;
2 – Replace it with:
$where = “status=4 $sections $categories $authors AND DATE_ADD( Posted, INTERVAL custom_1 DAY) >= NOW ORDER BY Posted ASC”;
3 – Find the Line:
$output[] = ($lastd != $date) ? "<dt>$date</dt>".n : "";
4 – Replace it with:
$duration = $a["custom_1"];
$enddate = date($dateformat, mktime(0,0,0, date("m", $a["posted"]), date("j", $a["posted"]) + $a["custom_1"] -1, date("Y", $a["posted"])));
if($lastd != $date){// If the event has the different start give us a new date title
if($duration != "")// If the event has a duration show an end
$output[] = "<dt>$date - $enddate</dt>";
else// If the event doesn't have a duration, don't show an end
$output[] = "<dt>$date</dt>";
}
else if($lastendd && $lastendd != $enddate)// If the event has the same start but different end make a new date title
$output[] = "<dt>$date - $enddate</dt>";
else// If the event has the same start and end put it under the same date title
$output[] = "";
3 – Insert this line:
$lastendd = $enddate;
4 – After this line:
$lastd = $date;
5 – And Finally, open the file /textpattern/lib/txp_admin.php
6 – Find the line
'custom_1_set' => 'Custom1',
7 – Replace ‘Custom1’ with the text you would like to appear on the admin under advanced settings. I changed it to ‘Duration (length in days)’ Even though it says must contain no spaces. I haven’t noticed any ill effects.
Hope this helps someone and maybe included in the next official release of this plugin. Huge head nod to Tad and Peter.
Offline
#11 2005-08-01 19:51:48
- june
- Member
- Registered: 2005-06-02
- Posts: 47
Re: [archived] smf_eventarticle
Hi,
I’m wondering how I use this plugin with the mdp_calendar. I have my calendar set up like so in the right column on my website:
<code>
<div class=“rightmenuheader”>Events Calendar</div>
<div class=“rightmenu”>
<txp:mdp_calendar_small class=“formatable” id=“formatwholetable” category=“event” displayfuture=“1” dayformat=“ABBR” />
</div>
</code>
Where would the “smf_eventarticle” code go?
thanks!
june
Offline
#12 2005-09-05 21:02:42
- ketchxup
- New Member
- Registered: 2005-09-02
- Posts: 8
Re: [archived] smf_eventarticle
me too
Offline