Title: [Plugin: SFBrowser] Network Blog Insertion
Last modified: August 20, 2016

---

# [Plugin: SFBrowser] Network Blog Insertion

 *  [archetypemkt](https://wordpress.org/support/users/archetypemkt/)
 * (@archetypemkt)
 * [15 years ago](https://wordpress.org/support/topic/plugin-sfbrowser-network-blog-insertion/)
 * I am having problems with the insertion the image which appears fine but the 
   code is:
 * <img src=”[http://www.domain.com/wp-content/blogs.dir/7/files/](http://www.domain.com/wp-content/blogs.dir/7/files/)../../../
   wp-content/blogs.dir/7/files/images/buttons/amlogo_190x60.png” alt=”amlogo_190x60″/
   >
 * The settings under SFBrowser are: /wp-content/blogs.dir/7/files/
 * which is the appropriate directory to show the specific networked blog’s image
   files.
 * Any thoughts would be great.
 * [http://wordpress.org/extend/plugins/sfbrowser/](http://wordpress.org/extend/plugins/sfbrowser/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  anonymized-151099
 * (@anonymized-151099)
 * [15 years ago](https://wordpress.org/support/topic/plugin-sfbrowser-network-blog-insertion/#post-2120491)
 * I can’t tell offhand…
 * It could be the dot in the folder (I never really tested with that).
 * But can you turn on debug-mode in the SFBrowser options, save, and inmediately
   view the source. Then in the third script tag after the comment ‘<!– wp-SFBrowser
   init -debug mode- –>’ there is a jQuery document.ready function. What are the
   values for: siteUri, filePrefixUri, relativePath and imageFolder ???
 *  Thread Starter [archetypemkt](https://wordpress.org/support/users/archetypemkt/)
 * (@archetypemkt)
 * [15 years ago](https://wordpress.org/support/topic/plugin-sfbrowser-network-blog-insertion/#post-2120613)
 * Hi Thanks for the reply. Here is what I see in debug mode.
 *     ```
       <!-- SFBrowser init -debug mode- -->
       		<link rel="stylesheet" type="text/css" media="screen" href="../wp-content/plugins/sfbrowser/css/sfbrowser.css" />
       		<script type="text/javascript" src="../wp-content/plugins/sfbrowser/SWFObject.js"></script>
       		<script type="text/javascript" src="../wp-content/plugins/sfbrowser/jquery.tinysort.min.js"></script>
       		<script type="text/javascript" src="../wp-content/plugins/sfbrowser/jquery.sfbrowser.js?324"></script>
       		<script type="text/javascript" src="../wp-content/plugins/sfbrowser/lang/en_US.js"></script>
       		<script type="text/javascript">
       			jQuery.sfbrowser.defaults.connector = "php";
       			jQuery.sfbrowser.defaults.sfbpath = "../wp-content/plugins/sfbrowser/";
       			jQuery.sfbrowser.defaults.base = "../../..//wp-content/blogs.dir/7/files//";
       			jQuery.sfbrowser.defaults.previewbytes = 600;
       			jQuery.sfbrowser.defaults.deny = ("php,php3,phtml").split(",");
       			jQuery.sfbrowser.defaults.browser = "<div id=\"sfbrowser\"><div id=\"fbbg\"></div><div id=\"fbwin\"><div id=\"winbrowser\"><div class=\"sfbheader\"><h3>SFBrowser</h3><div id=\"loadbar\"><div></div><span>Loading</span></div><ul id=\"sfbtopmenu\"><li><a class=\"textbutton newfolder\" title=\"New folder\"><span>New folder</span></a></li><li><form id=\"fileio\" name=\"form\" action=\"\" method=\"post\" enctype=\"multipart/form-data\"><input id=\"fileToUpload\" type=\"file\" size=\"1\" name=\"fileToUpload\" class=\"input\" /></form><a class=\"textbutton upload\" title=\"Upload\"><span>Upload</span></a></li><li><a class=\"sfbbutton maximizefb\" title=\"Maximize\">&nbsp;<span>Maximize</span></a></li><li><a class=\"sfbbutton cancelfb\" title=\"Cancel\">&nbsp;<span>Cancel</span></a></li></ul></div><div class=\"fbcontent\"><div id=\"fbtable\"><table id=\"filesDetails\" cellpadding=\"0\" cellspacing=\"0\"><thead><tr><th class=\"file\">Name</th><th class=\"type\">Type</th><th class=\"size\">Size</th><th class=\"date\">Date</th><th class=\"dim\">Dimensions</th><th class=\"buttons\"></th></tr></thead><tbody><tr><td class=\"loading\" colspan=\"6\"></td></tr></tbody></table></div><div id=\"fbpreview\"></div><div class=\"sfbbutton choose\">Choose</div><div class=\"sfbbutton cancelfb\">Cancel</div></div></div><div id=\"sfbfooter\"></div><div id=\"resizer\">&nbsp;</div></div><ul id=\"sfbcontext\"></ul></div>";
       			jQuery.sfbrowser.defaults.debug = true;
       			jQuery.sfbrowser.defaults.maxsize = 314572800;
       			jQuery.sfbrowser.defaults.plugins = ['imageresize','filetree','createascii','wp_db'];
       		</script>
       		<!-- SFBrowser plugins -->
       ```
   
 *  anonymized-151099
 * (@anonymized-151099)
 * [14 years, 12 months ago](https://wordpress.org/support/topic/plugin-sfbrowser-network-blog-insertion/#post-2120663)
 * That’s not precisely the part I meant but I think the problem is the base path.
 * What if you change your upload directory to something like ‘wp-content/uploads’.
   Does it work then?
 *  Thread Starter [archetypemkt](https://wordpress.org/support/users/archetypemkt/)
 * (@archetypemkt)
 * [14 years, 12 months ago](https://wordpress.org/support/topic/plugin-sfbrowser-network-blog-insertion/#post-2120666)
 * If I change it to ‘wp-content/uploads’ it goes into the main blog (blod id #1)
   files locations.
 * I’ve tried several variations and even leaving it blank to go to the root but
   I don’t seem to be able to get the insert image code to work right.
 *  anonymized-151099
 * (@anonymized-151099)
 * [14 years, 12 months ago](https://wordpress.org/support/topic/plugin-sfbrowser-network-blog-insertion/#post-2120673)
 * Ok… so you get the same faulty image src’s when using ‘wp-content/uploads’?
 *  Thread Starter [archetypemkt](https://wordpress.org/support/users/archetypemkt/)
 * (@archetypemkt)
 * [14 years, 12 months ago](https://wordpress.org/support/topic/plugin-sfbrowser-network-blog-insertion/#post-2120674)
 * I get the same type of thing:
 * <img src=”[http://www.yourdomain.com/wp-content/uploads/](http://www.yourdomain.com/wp-content/uploads/)../../../
   wp-content/uploads/images/buttons/image.png” alt=”image” />
 * It seems that if I can get rid of the “../../../wp-content/xx/xx” it would be
   fine. Just not sure sure how do that.
 *  [skapator](https://wordpress.org/support/users/skapator/)
 * (@skapator)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-sfbrowser-network-blog-insertion/#post-2120745)
 * Same problem here.
    First of all thanks a lot for this plugin, i was looking 
   for something like this for a long time. Back to the problem. Removing the slashes
   from the upload directory worked. But no matter what, the %file (from the Insertion
   rules) outputs the path with a preffix of “../” when NOT using relative paths.
   Example: `<img src="../http://localhost/wp_playground/sfb_uploads/images/New 
   folder/DSC_0861.jpg" alt="DSC_0861" />`
 * I am not a javascript developer but I looked in the files of the plugin and found
   a way around it, but not found a proper fix. Seems like a hack.
 * So in the file _jquery.sfbrowser.js_, around line 315, it says:
    `sReturnPath
   = (aFxSfbpath.join("/")+"//"+aFxBase.join("/")).replace(/(\/+)/,"/").replace(/(
   ^\/+)/,"");`
 * so deleted “aFxSfbpath.join(“/”)+” from that line.
    That seems to remove the “../”
   from the %file output. Then I added my site’s URL at the Insertion rules. It 
   looks like this: `<img src="http://mysite.com/wp_playground/%file" alt="%name"/
   >`
 * Seems to work. But I would really love your thoughts on what I did.
    And if there
   is a proper way to fix it.
 *  Thread Starter [archetypemkt](https://wordpress.org/support/users/archetypemkt/)
 * (@archetypemkt)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-sfbrowser-network-blog-insertion/#post-2120748)
 * Thanks so much. That took care of it for me.
 * But on my SFBrowser settings because I am using networked sites.
 * Use relative paths (unchecked – but either way works)
 * Upload directory`wp-content/blogs.dir/XX/files` (xx is blog id)
 * and changed the rule to: `<img src="%file" alt="%name" />`
 * and that seems to give me a cleaner url link
 * `<img src="http://www.mydomain.com/wp-content/blogs.dir/XX/files/images/newimage.
   png" alt="New Image" />`
 * Thanks again for the post.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘[Plugin: SFBrowser] Network Blog Insertion’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sfbrowser.svg)
 * [SFBrowser](https://wordpress.org/plugins/sfbrowser/)
 * [Support Threads](https://wordpress.org/support/plugin/sfbrowser/)
 * [Active Topics](https://wordpress.org/support/plugin/sfbrowser/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sfbrowser/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sfbrowser/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [archetypemkt](https://wordpress.org/support/users/archetypemkt/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-sfbrowser-network-blog-insertion/#post-2120748)
 * Status: not resolved