The Dark Alliance

Open Area => General Discussion => Topic started by: Fenderon on 12 August, 2008, 12:39:20 PM

Title: Guild news etc portal online.. !
Post by: Fenderon on 12 August, 2008, 12:39:20 PM
SimplePortal up and running ! Any news suggestions you have, just create a thread and PM me about it. :)

Edit: If you can't find the forum again.. click on "Forum" at top, or follow this link: http://tda.nu/forum/index.php?action=forum
Title: Re: Guild news etc portal coming online..
Post by: Fenderon on 12 August, 2008, 01:30:12 PM
a few bugs to work out with the themes..

For those that dont yet have it, this will add a "Forum" button to the top bar.. on the front page you'll see news and other info (including poll(s)).

In time and if we get XML like we had in daoc .. info pulled from the WAR servers can be used as well :)

More info to come..
Title: Re: Guild news etc portal coming online..
Post by: Urme on 12 August, 2008, 02:02:22 PM
Cool :) Hopefully WAR will have something equal (or better) to what DAoC has regarding XML and stuff. I just fixed the XML stats on fom.urme.com, Mythic had done some changes to the xml structure, doesn't seem they are updating it that frequently atm though.
Will write something similiar when WAR is released and if GOA are updating the XML for WAR which they didn't do that often for DAoC :/
Title: Re: Guild news etc portal coming online..
Post by: Fenderon on 12 August, 2008, 05:40:41 PM
Forum button added for Black Rain theme
Title: Re: Guild news etc portal coming online..
Post by: EchelonIV on 12 August, 2008, 09:42:03 PM
wicked \o/
Title: Re: Guild news etc portal coming online..
Post by: Fenderon on 13 August, 2008, 07:29:20 PM
feedback is welcome :P
Title: Re: Guild news etc portal coming online..
Post by: Lembit on 13 August, 2008, 07:44:32 PM
I like it. Tho not sure how to post stuff on it (if i actually can)

Can the latest polls be hiden from the main site? might come a time when we have a poll we dont want non members to see.
Title: Re: Guild news etc portal coming online..
Post by: Fenderon on 13 August, 2008, 07:46:24 PM
Polls were added manually. :) And if a person is not logged in, he can't see those in "member only" section.

edit: I'll sort rights for global mods now .. it should come up as an option when you create a new topic/thread
Title: Re: Guild news etc portal coming online..
Post by: Fenderon on 13 August, 2008, 07:48:56 PM
Lembit: See now if you get the option.
Title: Re: Guild news etc portal coming online..
Post by: Lembit on 13 August, 2008, 08:04:22 PM
It works.

Yes yes yes, replying here to get me postcount up   :)
Title: Re: Guild news etc portal coming online..
Post by: Fenderon on 13 August, 2008, 11:22:43 PM
I removed it :P

Hopefully this will give us xml data for WAR when/if that becomes available.
Title: Re: Guild news etc portal coming online..
Post by: Urme on 14 August, 2008, 08:20:48 AM
Is there any module so you can have an RSS feed from warhammeronline.com news? Basically just a box like "forum activity" on the first page. Or is _everything_ driven through forum posts?
Title: Re: Guild news etc portal coming online..
Post by: Fenderon on 14 August, 2008, 08:36:40 AM
There are php and html boxes.. so in theory if you have php code that reads the news, that should do it.
Title: Re: Guild news etc portal coming online..
Post by: Fenderon on 14 August, 2008, 09:15:51 AM
quick test using php code from here: http://www.rss-info.com/en_rssinclude-simple.html worked ..

however black text on userdefined background didn't really do it.. also it showed the entire entry, I'd like just the topics :)
Title: Re: Guild news etc portal coming online..
Post by: Joric on 14 August, 2008, 11:05:44 AM
fyi: I use the classic YABB SE theme - no fancy graphics and "readability" (hehe - what a word) is best I think. Some stuff might not work here, but as long as I can follow a link and come back to the forum I am happy for the moment.
Title: Re: Guild news etc portal coming online..
Post by: Fenderon on 14 August, 2008, 11:11:14 AM
I know.. you could try classic for now, if thats ok.. but I didn't find a "forum" button :p in the other themes I could just add it manually, there was no picture file
Title: Re: Guild news etc portal coming online..
Post by: Fenderon on 14 August, 2008, 03:40:44 PM
next on the todo list is to "move" the entire thing to http://tda.nu/ .. as in remove the "forum/" bit.

Will have to look into that a bit, might break a few links
Title: Re: Guild news etc portal coming online..
Post by: Urme on 14 August, 2008, 03:44:41 PM
I have written a simple rss parser for WAR news, try to add this code to a php block:
Example 1:
Code: [Select]
$feedurl = "http://feeds.warhammeronline.com/warherald/RSSFeed.war?type=current";

if(!$xml=simplexml_load_file($feedurl)){
echo 'Error reading RSS file';
}

foreach($xml->channel->item as $news) {
echo '<a href="'.$news->link.'" target="_blank">'.$news->title.'</a> - ';
echo '<small>'.strftime("%d %b",strtotime($news->pubDate)).'</small><br />';
}

Not sure if we have to cut number of letters so it's easier to read.

Edit: Changed the code a tiny bit 15:45cet

Edit2: Maybe it's easier to read if it's a list with a dot before the header.
Example 2:
Code: [Select]
$feedurl = "http://feeds.warhammeronline.com/warherald/RSSFeed.war?type=current";

if(!$xml=simplexml_load_file($feedurl)){
echo 'Error reading RSS file';
}

echo '<ul style="list-style-position:inside;margin:0;padding:0;">';
foreach($xml->channel->item as $news) {
echo '<li style="padding-bottom:5px;"><a href="'.$news->link.'" target="_blank">'.$news->title.'</a> - ';
echo '<small>'.strftime("%d %b",strtotime($news->pubDate)).'</small></li>';
}
echo '</ul>';
Title: Re: Guild news etc portal coming online..
Post by: Urme on 14 August, 2008, 04:09:41 PM
Btw that was the US RSS news feed, we could have two blocks one for US and one for EU :)
Create another block and change the $feedurl like this:

Code: [Select]
$feedurl = "http://www.war-europe.com/syndic_proc/rss/guest/en/rss.xml";

And it will display the EU WAR News.
Title: Re: Guild news etc portal coming online..
Post by: Urme on 14 August, 2008, 04:14:25 PM
Or maybe it's enough to display the four latest news from each feed in the same box:

Code: [Select]
$feedurl1 = "http://feeds.warhammeronline.com/warherald/RSSFeed.war?type=current";
$feedurl2 = "http://www.war-europe.com/syndic_proc/rss/guest/en/rss.xml";
$limit = 4;

function displaynews($title, $xml, $counter = 0) {
$newsdata = '<b>'.$title.'</b>';
$newsdata .= '<ul style="list-style-position:inside;margin:0;padding:0;">';
foreach($xml->channel->item as $news) {
if($counter < 4) {
$newsdata .= '<li style="padding-bottom:5px;"><a href="'.$news->link.'" target="_blank">'.$news->title.'</a> - ';
$newsdata .= '<small>'.strftime("%d %b",strtotime($news->pubDate)).'</small></li>';
}
$counter++;
}
$newsdata .= '</ul>';

return $newsdata;
}

if(!$xml1=simplexml_load_file($feedurl1)){
echo 'Error reading US News file<br />';
}

if($xml1) {
echo displaynews("US News", $xml1);
}

if(!$xml2=simplexml_load_file($feedurl2)){
echo 'Error reading EU News file<br />';
}

if($xml2) {
echo displaynews("EU News", $xml2);
}

Edit: Modified the code, so it's a bit cleaner, I'll stop the spam now :)
Title: Re: Guild news etc portal coming online..
Post by: Fenderon on 14 August, 2008, 04:38:57 PM

Fatal error: Call to undefined function: simplexml_load_file() in /web/tda.nu/forum/Sources/SPortal.php(1570) : eval()'d code on line 20
Title: Re: Guild news etc portal coming online..
Post by: Urme on 14 August, 2008, 04:41:42 PM
Hmm what version of PHP are running on the server? I thought simpleXML was default in php5+
Title: Re: Guild news etc portal coming online..
Post by: Urme on 14 August, 2008, 04:44:36 PM
create a new file called phpinfo.php

and add this code:
Code: [Select]
<?php
phpinfo
();
?>


Then you'll see which version of php and other stuff that's installed on the server.
Title: Re: Guild news etc portal online.. !
Post by: Dub on 20 August, 2008, 02:48:12 PM
SimplePortal up and running ! Any news suggestions you have, just create a thread and PM me about it. :)

Edit: If you can't find the forum again.. click on "Forum" at top, or follow this link: http://tda.nu/forum/index.php?action=forum

still havent this forum button on top , glad the link is still there! :)
Title: Re: Guild news etc portal online.. !
Post by: Fenderon on 20 August, 2008, 02:56:12 PM
what theme are you using?
Title: Re: Guild news etc portal online.. !
Post by: Fenderon on 20 August, 2008, 04:22:46 PM
added forum-button to the classic theme that a few people are using (including dub)

edit: it doesn't look 100% as the other buttons, but with four people using the theme .. I didn't bother, sorry :)
Title: Re: Guild news etc portal online.. !
Post by: Dub on 20 August, 2008, 10:11:00 PM
thanks :)

/hug
Title: Re: Guild news etc portal online.. !
Post by: Joric on 24 August, 2008, 10:48:43 PM
ah! great Fend, thank you!
SimplePortal 2.3.5 © 2008-2012, SimplePortal