Support » Fixing WordPress » Intranet WordPress Blog / URI to network shares & files

  • 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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    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;

    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!


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

    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.


    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Intranet WordPress Blog / URI to network shares & files’ is closed to new replies.