User Blog Mod Block

Forum rules
This forum is not for support requests.

Only post Modifications for Board3 Portal 1.0.x in this forum.

Topic author
Kharon
Active Member
Posts: 28
Joined: 18. May 2008 10:01

Re: User Blog Mod Block

Post by Kharon »

thanks, it is working :)

Amo
Active Member
Posts: 6
Joined: 11. April 2009 23:36
phpBB.com User: Amo

Re: User Blog Mod Block

Post by Amo »

I;'m going to try this tomorrow, really appreciate this dan. id do it noww but im a tad too drunk lol >.<

Anotheridiot
Active Member
Posts: 11
Joined: 9. October 2008 12:59
phpBB.com User: Anotheridiot
Location: Dublin, Ireland

Re: User Blog Mod Block

Post by Anotheridiot »

User Blog Mod has been updated to 1.0.10 last week.

I can confirm that this block works with the following versions of User Blog Mod
1.0.8 - Working 100%
1.0.9 - Working(Unconfirmed Bug - minor style issues if installed as first version)
1.0.10 - Working 100%

What I'd like to do with this next is take the 'Total Blog Entries' from the bottom of the index.php and add it to the Statistics block.
-Dan
_______________________________________
Lifes not fair... but the Root Password Helps !

FLATTOP
Active Member
Posts: 42
Joined: 7. February 2009 23:58

Re: User Blog Mod Block

Post by FLATTOP »

Thanks alot for the code guys, it works great! I changed the output from 5 to 3 so it doesn't take up too much space on my portal.

zappa84
Active Member
Posts: 18
Joined: 14. May 2009 22:01
Contact:

Re: User Blog Mod Block

Post by zappa84 »

Kevin wrote:To use the advantages of new features for additional blocks (easier updating portals with additional blocks) and the template variables, i would suggest to build the code of Dan up like this:
  • open root/portal/block/additional_blocks.php
    find:

    Code: Select all

    if (!defined('IN_PORTAL'))
    {
        exit;
    } 
    add after:

    Code: Select all

    include($phpbb_root_path . 'portal/block/blog_block.'.$phpEx); 
  • Create a new File, called blog_block.php, contend:

    Code: Select all

    <?php
    
    if (!defined('IN_PHPBB'))
    {
       exit;
    }
    
    if (!defined('IN_PORTAL'))
    {
       exit;
    }
    
        // Output Blog Entries
            $blog_limit = 5;
    
            $user->add_lang(array('mods/blog/common', 'mods/blog/view'));
            include($phpbb_root_path . 'blog/functions.' . $phpEx);
            $blog_data = new blog_data();
    
            $recent_blog_ids = $blog_data->get_blog_data('recent', 0, array('limit' => $blog_limit));
            $blog_data->get_user_data(false, true);
            update_edit_delete();
            if ($recent_blog_ids !== false)
            {
               foreach ($recent_blog_ids as $id)
               {
                  $template->assign_block_vars('recent_blogs', array_merge($blog_data->handle_user_data(blog_data::$blog[$id]['user_id']), $blog_data->handle_blog_data($id, $config['user_blog_text_limit'])));
               }
            }
    
    
    ?>
    upload this file to root/portal/block/
  • Create a new File, called blog_block.html, contend:

    Code: Select all

    {$C_BLOCK_H_L}<dl><dt>{L_RECENT_BLOGS}</dt></dl>{$C_BLOCK_H_R}
    <div class="panel" style="margin-bottom: 0px">
        <div class="inner"><span class="portal-corners-top-inner"></span>
            <!-- BEGIN recent_blogs -->
            <div class="post bg1<!-- IF recent_blogs.S_REPORTED or recent_blogs.S_UNAPPROVED --> reported<!-- ENDIF --><!-- IF recent_blogs.S_DELETED --> deleted<!-- ENDIF -->" <!-- IF recent_blogs.POST_COLOR and not recent_blogs.S_REPORTED and not recent_blogs.S_UNAPPROVED and not recent_blogs.S_DELETED -->style="background-color: {recent_blogs.POST_COLOR}"<!-- ENDIF -->>
               <div class="inner"><span class="corners-top"><span></span></span>
        
               <div class="postbody" style="width: 100%;">
               <!-- IF recent_blogs.S_UNAPPROVED or recent_blogs.S_REPORTED -->
                  <p class="rules">
                  <!-- IF recent_blogs.S_UNAPPROVED -->{UNAPPROVED_IMG} <a href="{recent_blogs.U_APPROVE}"><strong>{L_UNAPPROVED}</strong></a><!-- ENDIF -->
                  <!-- IF recent_blogs.S_REPORTED -->{REPORTED_IMG} <a href="{recent_blogs.U_REPORT}"><strong>{L_REPORTED_SHORT}</strong></a><!-- ENDIF -->
                  </p>
               <!-- ENDIF -->
        
               <dl>
                  <dt>
                     <strong><!-- IF recent_blogs.S_HAS_POLL --><img src="{T_THEME_PATH}/images/blog/icon_poll.gif" style="float: right;" alt="" /> <!-- ENDIF --><a href="{recent_blogs.U_VIEW}">{recent_blogs.TITLE}</a></strong> {L_POST_BY_AUTHOR} <strong>{recent_blogs.USER_FULL}</strong>  {L_POSTED_ON_DATE} {recent_blogs.DATE} <br />
                        <div class="content" style="width: 95%; padding: 4px;">{recent_blogs.MESSAGE}</div>
        
                        <!-- IF recent_blogs.S_HAS_ATTACHMENTS -->
                           <dl class="attachbox">
                              <dt>{L_ATTACHMENTS}</dt>
                           </dl>
                           <!-- ENDIF -->
        
                        <br clear="all" />
                        <div>
                           <span class="num_replies">{recent_blogs.REPLIES}</span>
                           {recent_blogs.VIEWS}
                        </div>
                  </dt>
               </dl>
               </div><span class="corners-bottom"><span></span></span>
               </div>
            </div>
            <!-- END recent_blogs -->
        <span class="portal-corners-bottom-inner"></span></div>
    </div>
    {$C_BLOCK_F_L}{$C_BLOCK_F_R} 
    upload this file to root/styles/prosilver/portal/block/
  • open /styles/prosilver/template/portal/block/additional_blocks_center.html
    find:

    Code: Select all

    <!-- additional_blocks //-->         
    add after:

    Code: Select all

        <!-- INCLUDE portal/block/blog_block.html --> 

Not tested, but that should be it. Dont forget to purge the cache afterwards. ;)


This is just great! but could you help me out to find the right code for subsilver2? please i really would like to set it up in the portal...

Parkstee
Active Member
Posts: 6
Joined: 29. December 2008 21:49
phpBB.com User: Parkstee

Re: User Blog Mod Block

Post by Parkstee »

Hi just tried this on my site and get the following error:

Code: Select all

[phpBB Debug] PHP Notice: in file /blog/includes/blog_data.php on line 440: Undefined index: MAX_OPTION_SELECT
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4247: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3503)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4249: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3503)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4250: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3503)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4251: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3503)
How can I fix it please

vonhazey
Active Member
Posts: 9
Joined: 22. January 2010 15:19
phpBB.com User: vonhazey
Location: Deepcar
Contact:

Re: User Blog Mod Block

Post by vonhazey »

Working fine on my site is this going to be officially released?
Image Image

yogiiskandar
Active Member
Posts: 1
Joined: 23. April 2010 10:37
phpBB.com User: yogiiskandar

Re: User Blog Mod Block

Post by yogiiskandar »

any edit for subsilver please

diesusi
Active Member
Posts: 4
Joined: 17. September 2010 16:51
phpBB.de User: diesusi

Re: User Blog Mod Block

Post by diesusi »

Hello!

Sorry, my english is really bad. :(
I'm looking for the a simular block.

I'd like to get the recent comments on a block on the Portal, but I don't know how to.

Would anybody help me please?

Thanks a lot!

Antartico
Active Member
Posts: 7
Joined: 25. January 2011 12:05

Re: User Blog Mod Block

Post by Antartico »

Hello everyone,
As I wrote in my previous post, I'm using board3 + the blog mod.
Talking about the blog mod:
- How can I put a post in the embed code of youtube?
- There is a html editor for the posts?
- Is possible to show in the "blog mod block" a preview of the post? To let you know, as a blogger's function <--more-->
Locked

Return to “board3 Portal v1.0.x - Modifications in Dev”