Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Sjeiti

    (@sjeiti)

    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

    (@archetypemkt)

    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 -->
    Plugin Author Sjeiti

    (@sjeiti)

    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

    (@archetypemkt)

    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.

    Plugin Author Sjeiti

    (@sjeiti)

    Ok… so you get the same faulty image src’s when using ‘wp-content/uploads’?

    Thread Starter archetypemkt

    (@archetypemkt)

    I get the same type of thing:

    <img src=”https://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.

    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="../https://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="https://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

    (@archetypemkt)

    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 directorywp-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="https://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.