The MU forums have moved to WordPress.org

Link error? (16 posts)

  1. Novocain
    Member
    Posted 16 years ago #

    Hi again, im using fiimi last updated, and in my list of recent updates i seem to get a mix om activation screens and a list of recently updated blogs, how can this be?

    http://bloggproffs.se/nyligen-uppdaterade/

    as you can see, the list contains 2 items that are not suposed to be there "my weblog" this link only points to an activation screen for the blog at hand, altough if u click the link in the same screen (on the activation screen) you will land at the blog where the link was suposed to point, and as you can see the blog do already have posts and content on them, is there any way to filter this kind of list problem?

    Best regards - Fredrik Näs

  2. drmike
    Member
    Posted 16 years ago #

    What are you using to display that list? The code ywould be helpful.

  3. Novocain
    Member
    Posted 16 years ago #

    oh sorry, i have activated Fiimi plugin and im using this template to call for it.

    <?php
    /*
    Template Name: Fimii last updated
    */
    ?>
    <?php get_header(); ?>

    <div id="content">

    <div id="contentleft">
    <p><h1>Nyligen uppdaterade bloggar:</h1><br>
    <?php
    if(function_exists('fimii_wpmu_last_updated'))
    {
    fimii_wpmu_last_updated();
    }
    ?>
    </div>
    <?php include(TEMPLATEPATH."/r_sidebar.php");?>

    </div>

    <!-- The main column ends -->

    <?php get_footer(); ?>

    and that would be the list that you see under http://bloggproffs.se/nyligen-uppdaterade/

    best regards!

  4. Novocain
    Member
    Posted 16 years ago #

    is there a better plugin to use, to get sitwide "last updated"? i got fiimi from mudev if im not mistakin.

    Best regards.

  5. lunabyte
    Member
    Posted 16 years ago #

    Um, yes there is.

    From home.php in the "home" theme from a stock MU install:

    $blogs = get_last_updated();
    if( is_array( $blogs ) ) {
    	?>
    	<ul>
    	<strong>Updated Blogs</strong>
    	<?php foreach( $blogs as $details ) {
    		?><li><a href="http://<?php echo $details[ 'domain' ] . $details[ 'path' ] ?>"><?php echo get_blog_option( $details[ 'blog_id' ], 'blogname' ) ?></a></li><?php
    	}
    	?>
    	</ul>
    	<?php
    }
    ?>

    It really is as simple as that. It's already built into MU, so what not use it?

  6. Novocain
    Member
    Posted 16 years ago #

    hi Luna, altough my version dosent seem to read from the "home" or "default" theme folders, only the files i put in "Dropshadow - 2columns" (wich is the current theme im using) - shows up in the page_template drop down menu. so i don´t know how to go about to get it to read from "home".

  7. lunabyte
    Member
    Posted 16 years ago #

    You don't.

    Add the above code to the theme you're using, where you want it to show up.

    If it's a page, then make a page template. If it's on the home page, add it to your home.php.

    Just because certain code is in a particular theme, doesn't mean you can copy it to the one you want it in.

  8. Novocain
    Member
    Posted 16 years ago #

    yeah, altough in some situations it would be good to know that ALL themes would read from home folder, and not the home.php in current theme, it would be good to know that all themes acts the same way, and that features (the templates put in home folder) is not theme based and would act the same on all blogs since it would read from home folder.

  9. Novocain
    Member
    Posted 16 years ago #

    the code worked as expekted, altough the "name" problem is stil there, but now the "my weblog" points to the site instead of an activation link (wich is good, one step in the right direction), im guessing that "my weblog" apears when people dosent fill-in the "blogtitle" field on blog creation? how can i go about to create a function that checks this and echos out either blogtitle, and if no blogtitle, echo out the blog (sub) such as the_name.bloggproffs.se so if no bloggtitle is defined, the "last updated list" would echo out "the_name" instead, this would prevent the main blog from showing 10 (or any number) "my weblogs" on an unlucky day, instead you would get an unique name on each post.

    and now to the problem, i dont know how to go about doing this =)

  10. lunabyte
    Member
    Posted 16 years ago #

    All themes read from the home theme?

    Sorry, but that's ridiculous. Talk about a nightmare, as each theme is usually different in terms of all kinds of thing, not excluding html, classes, id's, and all kinds of stuff.

    If you want it to be something you can just add to whatever theme, then just take that code and turn it into a widget.

    As for echoing out names and such, seriously, that's simple, elementary php stuff. I mean darn near as basic as a hello world echo, maybe a step or two above, but still very basic to pull off.

    Simple logic. If/else. Conditional. Whatever you want to call it.

    Although, "my weblog" could be from a reported bug where there are 2 values for the blog title. There's a thread on that though.

  11. Novocain
    Member
    Posted 16 years ago #

    yeah its not the if/else/elseif and so on that botherd me, it was the "how to get everything before.domain.tld" but found a way (havent done it yet, but with regexp it should be possible. im not that strong on regexp, but there is more then enough material on the web for my purpouse

    gona se if i can find that thread u mentioned about 2 values.

    thx for your help

  12. lunabyte
    Member
    Posted 16 years ago #

    As in... how to get the username from the domain?

    Explode it by the decimal, and use the first key of the resulting array. ;)

    <edit>

    Oh, by using the internal function that's already built in, you also take advantage of the fact that the function is cached as well.

    </edit>

  13. af3
    Member
    Posted 16 years ago #

    lunabyte, i'm having similar problem on the "my weblog" being the default name of new weblogs even if users have changed this to their own blogname; also their backends have two blogname entries.

    cant find the "my weblog" bugs thread u've mentioned. pls point me to the right direction. thx.

  14. af3
    Member
    Posted 16 years ago #

    Just found out that there is a ticket already opened on this -- Ticket #354 (new defect). Just commented out line #238 for now.

  15. Supergeek
    Member
    Posted 16 years ago #

    I can't find the thread either. The search function here is not very helpful. I am having the same problem with "My Weblog". I replied to a post in the Troubleshooting forum, but I haven't been able to find any other activity on that issue. I'm sure it's here, it's just impossible to use Search to find it.

  16. af3
    Member
    Posted 16 years ago #

    all/lunabyte,
    in addition to the persistent and double entry for blogname; this could be another bug (no plugin installed) except using your code above to display latest updated blogs also due to when a user register a blog, their siteurl in the database is appended with the activation link; i.e. siteurl value is http://username.domain.com/wp-activate.php?xxxxxx
    even when their site is already activated.

    how to stop this? thanks

About this Topic