WordPress.org

Ready to get started?Download WordPress

Forums

Intranet WordPress Blog / URI to network shares & files (6 posts)

  1. x11tech
    Member
    Posted 6 years ago #

    I have installed wordpress as an intranet blog for news reporting internal to my company. I would like to create links in the "blogroll" to network share locations where files are typically found.

    Is this feature supported? The search terms I have been using (URI, file href, network share link, file link, etc.) have been unsuccessful in turning up an answer to my question (or even a reference that indicates that this is not possible.)

    As an alternative to this (if this feature does not work) I can create pages with URLs to local network shares and files just fine and create a link to those pages via the blogroll. It just increases the number of clicks a user needs to perform in order to acquire the desired information. Since the blog (and other web CMS systems I've implemented) are new technology, simplifying use will increase the rate of adoption which is highly desirable.

    We're using the blog (and a wiki) to generate self-help IT documentation and knowledgebase and to notify people of upcoming IT related events (network outages/etc). This will reduce user confusion during network outages because we'll have a portal that will explain what/when/why of any network outage during and after it occurs. Plus any change or simple procedure can also be documented, reducing the time our IT staff spends on mundane and routine desktop administration. Being a small company, empowering each user to help themselves it critical to reducing our demands on the existing IT staff.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    I know, I really hate it when WordPress tries to clean up your URLs. I wish it didn't do that, but I've been unable to convince any of the developers of this being completely unnecessary.

    Here's some code that disables the stupid and pointless functionality of "clean_url". You can add this to your theme's functions.php file, or put it in a custom made plugin.

    function restore_url($clean,$original,$context) {
    if ($context == 'display') return $original;
    else return $clean;
    }
    add_filter('clean_url,'restore_url',3);
  3. wolfdogg
    Member
    Posted 6 years ago #

    This code doesn't work for me.. wish it did. I too am using WordPress for an intranet site. It was amazingly simple to install after loading WAMP5 online server, which was also amazingly easy to install and implements apache, PHP and MySql for you with just a few clicks.

    But, I still can't put network URLs in my blogroll. It simply doesn't like them. I thought I had found a better workaround, in going to the MySql database and updating wp_links.link_url. Oddly, MySql takes the changes and they now display correctly in the table, but WordPress still retains the old links. Any idea why?

    Is there anyway to customize the above code and make this work? That would be ideal!

    Thanks!

  4. wolfdogg
    Member
    Posted 6 years ago #

    Does mysql cache it's queries? Is there a way to clear it?

  5. hirshj
    Member
    Posted 6 years ago #

    The other option is to edit the file wp-includes/formatting.php (or write a plugin that replaces the function). Look for the function clean_url and look for where $protocols is being defined. If you add 'file' into the array, it will work properly for new links being created.

    Cheers,
    -Joshua

  6. dan.boers
    Member
    Posted 5 years ago #

    I tried this with an older version of wordpress (2.0.x) and it worked like a charm, but recently I upgraded to wordpressmu 2.6.5 and although it seems like the code for this is relatively the same (for 'cleaning' urls) it still cleans the url and strips 'file:' from the string.

    Since I'm able to modify the text in the database to include 'file:' and it shows up correctly in the post.

    Since im using mu, I was wondering if anyone can verify that the hack still works in the standard version of wordpress, or if another solution needs to be found.

Topic Closed

This topic has been closed to new replies.

About this Topic