WordPress.org

Ready to get started?Download WordPress

Forums

Diamond MultiSite Widgets
Show Post Content/titles (3 posts)

  1. ferdri3
    Member
    Posted 2 years ago #

    Hello everyone,

    I'm using Diamond Multisite Widget (obviously haha) and I wonder if someone could help me letting it show either (or both) the post titles or the posttitles + the first ~50 words of that post.

    The situation:
    I have a main site with a widget area which (should) shows the newest posts from all blogs.

    Example 1:

    - "Newest post title" (from blog 03)
    - "Newest post title" (from blog 01)
    - "Newest post title" (from blog 49)
    - "Newest post title" (from blog 12)
    - "Second newest post title" (from blog 01)
    - "Newest post title" (from blog 32)

    Example 2:

    ------------------------------------
    "Newest post title" (from blog 01)
    "First ~50 words of that post"
    ------------------------------------
    "Newest post title" (from blog 49)
    "First ~50 words of that post"
    ------------------------------------
    "Newest post title" (from blog 12)
    "First ~50 words of that post"
    ------------------------------------
    "Second newest post title" (from blog 01)
    "First ~50 words of that post"
    ------------------------------------

    I believe the plugin already orders them by date.

    Now we only get the option (in the widget screen) to do:

    Format string:
    <<<<<<<input field>>>>>>>>>>>
    {title} - The blog's title
    {title_txt} - The blog's title (without link)
    {description} - The blog's description
    {reg} - The registration's date
    {last_update} - The blog's last update date
    {avatar} - Author's avatar
    {postcount} - The blog's posts count
    {comment_count} - The blog's comment count - only works with Order by comment count
    {more} - The "Read More" link

    I really hope someone can help me!
    Thanks in advance!
    Ferdi

    PS. I read this post:
    http://wordpress.org/support/topic/plugin-diamond-multisite-widgets-sorting-on-blog-name?replies=3
    but it doesnt seem to work in the widget. The output I get is:

    {blog}testing{date}\" count=\"5\" post_limit=\"1\" before_content=\"\" after_content=\"
    Blog	Latest Post	Post Date
    \" before_item=\"\" after_item=\"\"

    The dashes get added by themselves somehow.

    http://wordpress.org/extend/plugins/diamond-multisite-widgets/

  2. ferdri3
    Member
    Posted 2 years ago #

    additional information:

    The folder has 9 php files:
    - admin.php
    - bloglist.php
    - broadcast-posts.php
    - cache.php
    - multisite-widgets.php
    - post-feed.php
    - recent-comments.php
    - recent-posts.php
    - functions.php

    Anyone good with PHP could help me I guess.
    I don't know if it is any help but here is the functions.php code:

    <?php
    function diamond_arr_to_str($arg) {
    	$ret = '';
    	if (!$arg || $arg == '')
    		return $ret;
    	foreach($arg AS $a)
    		$ret.=$a;
    	return $ret;
    }
    
    function get_format_txt($code) {
    	if ($code && $code != '' && mb_substr($code, 0, 8) == 'encrypt:')
    		return base64_decode(mb_substr($code, 8));
    	return $code;
    }
    
    function get_format_code($txt) {
    	if ($txt && $txt != '')
    		return 'encrypt:' . base64_encode($txt);
    	return $txt;
    }
    ?>
  3. ferdri3
    Member
    Posted 2 years ago #

    So I guess I need to give more info.
    I found this code, but dont know how to implent it into this plugin.
    http://wordpress.org/support/topic/aggregating-recent-posts-to-parent-site-in-multisite-install?replies=46#post-1628866

    Well here it says how to implent it hardcoding way:
    http://wordpress.org/support/topic/aggregating-recent-posts-to-parent-site-in-multisite-install/page/2?replies=46#post-2195353

    Still would love to have it in widgetform

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic