MyBB.de Forum
Threads Posted On Calendar - Druckversion

+- MyBB.de Forum (https://www.mybb.de/forum)
+-- Forum: Anpassungen (https://www.mybb.de/forum/forum-47.html)
+--- Forum: Plugin-Veröffentlichungen und -Support (https://www.mybb.de/forum/forum-82.html)
+--- Thema: Threads Posted On Calendar (/thread-19884.html)



Threads Posted On Calendar - MyBB.de Bot - 28.09.2007

Eine neue Erweiterung wurde veröffentlicht: Threads Posted On Calendar

Zitat:Shows threads posted on the day views in the MyBB calendar.

Upload to inc/plugins
activate in plugin manager
enjoy.

Vorschau:
http://byteforums.com/calendar.php?action=dayview&year=2007&month=9&day=22



RE: Threads Posted On Calendar 1.0 - Grauer-Magier - 02.02.2008

Ein supergenialer Plugin!!!


RE: Threads Posted On Calendar 1.0 - Grauer-Magier - 25.11.2009

Seit einiger Zeit versuche ich diesen Plugin für mein Forum umzuschreiben, also für die Benutzung auf Mybb 1.4, aber irgendwie klappt das nich so richtig.

Habe die Änderungen aus https://www.mybb.de/forum/thread-10640.html benutzt, soweit diese nötig waren, aber irgenwie wird immer noch nix angezeigt. Hmm.

Mag mir jemand evt. unter die Arme greifen?

LG, GM!


RE: Threads Posted On Calendar 1.0 - StefanT - 25.11.2009

Kannst du mal deinen Code posten?


RE: Threads Posted On Calendar 1.0 - Grauer-Magier - 30.11.2009

PHP-Code:
<?php
//Goughy000 -> GOUGHY_CALENDAR_THREADS.php

if(!defined("IN_MYBB"))
{
    die(
"Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

$plugins->add_hook("calendar_dayview_end""goughy_calendar_threads_dayviewlist");

function 
goughy_calendar_threads_info(){
    return array(
        
"name"        => "Threads On Calendar",
        
"description"   => "Lists threads on calendar",
        
"website"    => "http://www.byteforums.com/",
        
"author"     => "Goughy000",
        
"authorsite"    => "http://www.goughy000.com/",
        
"version"     => "2.0",
    
"guid" => "a8bd220dd8c01acd028bd360ed2f0f6f"
    
);
}

function 
goughy_calendar_threads_dayviewlist(){
    global 
$events;
    global 
$day;
    global 
$month;
    global 
$year;
    global 
$db;
    global 
$mybb;
    
    
$timestamp_from strtotime($year."-".$month."-".$day." 00:00:01");
    
$timestamp_to strtotime($year."-".$month."-".$day." 23:59:59");
    
    
$threadsquery $db->query("SELECT * FROM `".TABLE_PREFIX."threads` WHERE `dateline`>'".$timestamp_from."' AND `dateline`<'".$timestamp_to."'");
    
    
$threaddisplay .= "<br /><table border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"tborder\">
<tr>
<td class=\"thead\" colspan=\"6\"><strong>Threads Posted</strong></td>
</tr>"
;

    
$threaddisplay .= "<tr class=\"tcat\"><td></td><td><strong>Title</strong></td><td><strong>Author</strong></td><td><strong>Forum</strong></td><td><strong>Replies</strong></td><td><strong>Views</strong></td></tr>";
    
    if(
$db->num_rows($threadsquery) > 0){
        while(
$threaddetails $db->fetch_array($threadsquery)){
            
$forumdetailsquery $db->query("SELECT * FROM `".TABLE_PREFIX."forums` WHERE `fid`='".$threaddetails['fid']."'");
            
$forumdetails $db->fetch_array($forumdetailsquery);

            
$icondetailsquery $db->query("SELECT * FROM `".TABLE_PREFIX."icons` WHERE `iid`='".$threaddetails['icon']."'");
            
$icondetails $db->fetch_array($icondetailsquery);

            if(
$db->num_rows($icondetailsquery) > 0){
                
$icon "<img src=\"".$mybb->settings['bburl']."/".$icondetails['path']."\" alt=\"Post Icon\" />";
            }else{
                
$icon "";
            }

            
$threaddisplay .= "<tr class=\"trow1\"><td>".$icon."</td><td><a href=\"".$mybb->settings['bburl']."/showthread.php?tid=".$threaddetails['tid']."\">".$threaddetails['subject']."</a></td><td><a href=\"".$mybb->settings['bburl']."/member.php?action=profile&uid=".$threaddetails['uid']."\">".$threaddetails['username']."</a></td><td><a href=\"".$mybb->settings['bburl']."/forumdisplay.php?fid=".$threaddetails['fid']."\">".$forumdetails['name']."</a></td><td><a href=\"javascript:MyBB.whoPosted(".$threaddetails['tid'].");\">".$threaddetails['replies']."</a></td><td>".$threaddetails['views']."</td></tr>";
        }
    }else{
        
$threaddisplay .= "<tr colspan=\"2\"><td>No Threads on this day</td></tr>";
    }
    
    
$threaddisplay .= "</table>";
    
    
$events.=$threaddisplay;
}

?>

Es lässt sich zwar aktivieren im Admin-CP, aber es tut sich nix.


RE: Threads Posted On Calendar 1.0 - StefanT - 30.11.2009

Auf Anhieb sehe ich keinen Fehler.


RE: Threads Posted On Calendar 1.0 - Grauer-Magier - 30.11.2009

Jo, so gehts mir auch.
Ich hab die Vermutung das das auslesen nich richtig klappt - hab aber da nich genug PHP-Erfahrung um das festzustellen ... ich seh langsam den Code vor lauter Zeichen nich mehr ^^


RE: Threads Posted On Calendar 1.0 - Jockl - 30.11.2009

Gibt es denn den Hook "calendar_dayview_end"? Ich konnte nur "calendar_dayview_start" finden.