vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vBJournal for vBulletin 3.5 (https://vborg.vbsupport.ru/showthread.php?t=96462)

Stangsta 04-05-2006 09:46 PM

Quote:

Originally Posted by thumbsucker
Can someone tell me where I can get MOODS for VBJournal?

You make your own in the options panel.

davide101 04-06-2006 08:39 PM

I inspired by Cloud Warrior, I decided it was time to get the latest blog entries on the rest of my site. After an hour of playing around, I have some working code. This code is NOT COMPLETE! You need to manually put in the RDF header information in the code. Please don't try to use it if you aren't comfortable playing with PHP code. If someone wants to fix it up and repost it with an explanation that a noobie could follow, by all means go ahead. My brain is about to quit for the day so I'm not quite up to it.

Added the following section of code to the journal.php file causes journal.php?do=rss will pull the latest entries in RDF format.

Code:

// RSS SUPPORT

if($_REQUEST['do']=='rss')
{
        $vbulletin->input->clean_array_gpc('r', array(
                'type' => TYPE_STR,
        ));
        // ATTN Compatibility Code
        $type =& $vbulletin->GPC['type'];
        // ATTN Compatibility Code
       
        require_once(DIR . '/includes/functions_file.php');
        // $journalinfo= $db->query_first("SELECT journalist,journalist_id,journalname,journaldesc FROM " . TABLE_PREFIX . "journals");
        $getentries= $db->query("SELECT " . TABLE_PREFIX . "journal_entries.entrytitle, " . TABLE_PREFIX . "journal_entries.entrytext, " . TABLE_PREFIX . "journal_entries.entrydate,
                        " . TABLE_PREFIX . "journal_entries.private, " . TABLE_PREFIX . "journal_entries.entry_id, " . TABLE_PREFIX . "journal_entries.allowedusers, " . TABLE_PREFIX . "journals.journalist FROM
                        " . TABLE_PREFIX . "journal_entries, " . TABLE_PREFIX . "journals WHERE " . TABLE_PREFIX . "journal_entries.entry_active=1 AND
                        " . TABLE_PREFIX . "journal_entries.journal_id = " . TABLE_PREFIX . "journals.journal_id ORDER BY entrydate DESC");
   
                                require_once('./includes/class_bbcode.php');

                                $rss1_header .= "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n\r\n";
                                $rss1_header .= "<rdf:RDF\r\n";
                                $rss1_header .= "  xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\r\n";
                                $rss1_header .= "  xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\r\n";
                                $rss1_header .= "  xmlns:content=\"http://purl.org/rss/1.0/modules/content/\"\r\n";
                                $rss1_header .= "  xmlns=\"http://purl.org/rss/1.0/\"\r\n";
                                $rss1_header .= ">\r\n\r\n";
                                $rss1_header .= "<channel rdf:about=\"".$vbulletin->options['bburl']."/journal.php?do=downloadjournal&amp;j=".$j."&amp;type=rss1\">\r\n";
                                if ($journalinfo['journalname'] == "") { $journalinfo['journalname'] = $journalinfo['journalist'] . "'s Blog"; }
                                $rss1_header .= "<title>Diabetes Daily Member Blogs: Recently Updated</title>\r\n";
                                $rss1_header .= "<link>".$vbulletin->options['bburl']."/journal.php?do=showjournal&amp;j=".$j."</link>\r\n";
                                if (empty($journalinfo['journaldesc'])) { $journalinfo['journaldesc'] = $journalinfo['journalist']."'s Blog at ".$vbulletin->options['bbtitle']; }
                                $rss1_header .= "<description>".htmlspecialchars($journalinfo['journaldesc'])."</description>\r\n\r\n";
                                $rss1_header .= "<items>\r\n";
                                $rss1_header .= "\t<rdf:Seq>\r\n";

                                $totalentries = 0;
                                $previousentry = 0;

                                while($entry= $db->fetch_array($getentries))
                                {
                                        if($entry['private']!=1 AND $previousentry != $entry['entry_id'])
                                        {
                   
                                                $totalentries++;

                                                $parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
                                                $entry['entrytext'] = $parser->do_parse($entry['entrytext']);
                                                $entry['entrytext']= unhtmlspecialchars(stripslashes($entry['entrytext']));
                                                $entry['entrytext']= ereg_replace("{smilies}", $vbulletin->options['bburl']."/images/smilies", $entry['entrytext']);
                                                                                                $entry_short= substr ( $entry['entrytext'], 0, 200);

                                                $entry['entrytitle']= stripslashes($entry['entrytitle']);

                                                $rss1_header .= "\t\t<rdf:li rdf:resource=\"".$vbulletin->options['bburl']."/journal.php?do=showentry&amp;e=".$entry['entry_id']."\" />\r\n";
                                                $rss1_body .= "\t<item rdf:about=\"".$vbulletin->options['bburl']."/journal.php?do=showentry&amp;e=".$entry['entry_id']."\">\r\n";
                                                                                                $rss1_body .= "\t\t<author>".htmlspecialchars($entry['journalist'])."</author>\r\n";
                                                $rss1_body .= "\t\t<title>".htmlspecialchars($entry['entrytitle'])."</title>\r\n";
                                                $W3CDTFdate = preg_replace("/(\+|\-)([0-9]{2})([0-9]{2})/","$1$2:$3", date("O",$entry['entrydate']));
                                                $rss1_body .= "\t\t<dc:date>".date("Y-m-d",$entry['entrydate'])."T".date("H:i:s",$entry['entrydate']).$W3CDTFdate."</dc:date>\r\n";
                                                $rss1_body .= "\t\t<link>".$vbulletin->options['bburl']."/journal.php?do=showentry&amp;e=".$entry['entry_id']."</link>\r\n";
                                                $rss1_body .= "\t\t<content:encoded><![CDATA[".$entry_short."]]></content:encoded>\r\n";
                                                $rss1_body .= "\t\t<description>".htmlspecialchars(strip_tags($entry_short))."</description>\r\n";
                                                $rss1_body .= "\t</item>\r\n\r\n";
                                        }
                                                                                $previousentry = $entry['entry_id'];
                                        if($totalentries=="15") { break; }
                                }

                                $rss1_header .= "\t</rdf:Seq>\r\n";
                                $rss1_header .= "</items>\r\n\r\n";
                                $rss1_header .= "</channel>\r\n\r\n";

                                $rss1_body .= "</rdf:RDF>";

                                $filestring = utf8_encode($rss1_header.$rss1_body);
                                $filename = "$journalinfo[journalist]_blog_".vbdate($vbulletin->options['dateformat'], TIMENOW).'.rdf';

                                header("Content-Type: application/rdf+xml; charset=utf-8");
                        header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
                        header('Content-Disposition: attachment; filename="' . $filename . '"');
                        header('Content-Length: ' . strlen($filestring));
                        header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
                        header('Pragma: public');

                                echo $filestring;
// RSS 1.0 Ends
}

The more I play with this hack, the more I love it!

tuanluu 04-06-2006 11:46 PM

I think It is time to realease an update for this mode. due the popular and more bugs free! What do your think?

AN-net 04-07-2006 01:11 AM

i am working on 1.5 of this hack on the 3.0.x platform, once its complete i will port it over to 3.5.x.

tuanluu 04-07-2006 04:51 AM

thank I am very glad to hear this good news

Brandon Sheley 04-08-2006 04:01 AM

how can I make the navbar link viewable to guest ?

PixelFx 04-10-2006 08:42 PM

any way to fix BB Code in threads when posting in vbjournal? I'm using php 4.4.2 / mysql 4.1.18 / apache 2.0 .. on xp pro .. with vb3.5.4 ..

everything else seems to work but that.

bada_bing 04-11-2006 02:39 AM

Any chance of updating this to 3.5.x and any current screen shots?

SludgeMeister 04-12-2006 03:58 AM

Is there anyway to allow users to feed their LiveJournal into vbJournal (via RSS?)? I notice AN-Net had mention of it sometime in 2005 but it seems to have faded away and can't determine whether this version has this option?

Thanks

AN-net 04-12-2006 01:30 PM

Quote:

Originally Posted by SludgeMeister
Is there anyway to allow users to feed their LiveJournal into vbJournal (via RSS?)? I notice AN-Net had mention of it sometime in 2005 but it seems to have faded away and can't determine whether this version has this option?

Thanks

this version does not, however on the vB Journal Development RoadMap i do plan to have at some point interaction with API's of popular journal and blogging systems.


All times are GMT. The time now is 11:02 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02767 seconds
  • Memory Usage 1,775KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete