Auto-Announcements Poster and Website Template request

Results 1 to 5 of 5
  1. #1
    Proficient Member Azunah is offline
    MemberRank
    Mar 2010 Join Date
    171Posts

    Auto-Announcements Poster and Website Template request

    Hello RaGEZONErs,

    I want to know if what should I do to add announcements automatically from my forum to website.?. Also can you please give me the link where to download the default website not Dark Theme. Thank you.

    -Azuna


  2. #2
    ANTI emi is offline
    MemberRank
    Mar 2009 Join Date
    ZHLocation
    1,378Posts

    Re: Auto-Announcements Poster and Website Template request

    Quote Originally Posted by Azunah View Post
    Hello RaGEZONErs,

    I want to know if what should I do to add announcements automatically from my forum to website.?. Also can you please give me the link where to download the default website not Dark Theme. Thank you.

    -Azuna
    You can do that with and Vbulletin Forum with Rss feeds.
    Cabal tools 2 reuploaded: http://www.mmowebs.com/blog/cabaltoolz-beta2-re-upload/

  3. #3
    Banned Yamachi is offline
    BannedRank
    Oct 2006 Join Date
    Jolly EnglandLocation
    3,517Posts

    Re: Auto-Announcements Poster and Website Template request

    This is a snippet from a site that is part of my launcher. It takes threads from an IPB forum and displays them in a short list (4 items maximum. Imitates the official CABAL notice.php). You can use the same sort of method for your front page.

    Code:
    <?php
    	$username="changeme";
    	$password="changeme";
    	$database="changeme";
    	mysql_connect(localhost,$username,$password);
    	@mysql_select_db($database) or die( "Unable to select database");
    	$catid=$_GET['catid'];
    	if ($catid==NULL) $catid="[Notice]";
    	$query="SELECT * FROM ipb3topics WHERE title LIKE '$catid%' AND forum_id='changeme' ORDER BY tid DESC";
    	$results=mysql_query($query) or die(mysql_error());
    	$rows=mysql_numrows($results);
    	$i=0;
    	while ($i < $rows && $i < 4) {
    		$title=mysql_result($results,$i,"title");
    		$dtitle=str_replace(array('[Notice]', '[Update]', '[Event]'), array('', '', ''), $title);
    		$tid=mysql_result($results,$i,"tid");
    		$url=sprintf('http://www.changeme.net/index.php?showtopic=%d', $tid);
    		$date=mysql_result($results,$i,"start_date");
    		echo "<tr><td id='date'>". date('Y-m-d', $date) ."</td><td id='title'><a id='tab' href='$url' target='_new'>$dtitle</a></td></tr>";
    		$i++;
    	}
    	mysql_close();
    ?>
    P.S. Don't ask me how to implement it... It's up to you how to figure that out. Also, the above code is an EXAMPLE. It is out of context by itself. Don't expect to be able to just copy-paste the code and have it working how you want it.

    Further Information: This code obviously takes a post argument (catid) that consists of a string ("[Notice]", "[Update]" or "[Event]"). It then looks for any threads in the specified subforum that have titles beginning with $catid (ex. [Event]Xmas Socks!). Then, it strips the prefix from the thread title ($dtitle), and uses it as part of the URL to the thread.
    Last edited by Yamachi; 08-04-10 at 08:52 PM.

  4. #4
    Proficient Member Azunah is offline
    MemberRank
    Mar 2010 Join Date
    171Posts

    Re: Auto-Announcements Poster and Website Template request

    Well, Yamachi, it's not works for my hosting provider... :((( Any help anymore??? ;P

  5. #5
    Banned Yamachi is offline
    BannedRank
    Oct 2006 Join Date
    Jolly EnglandLocation
    3,517Posts

    Re: Auto-Announcements Poster and Website Template request

    Quote Originally Posted by Yamachi View Post
    P.S. Don't ask me how to implement it... It's up to you how to figure that out. Also, the above code is an EXAMPLE. It is out of context by itself. Don't expect to be able to just copy-paste the code and have it working how you want it.
    Read that.



Advertisement