Recent Topics

1 Mar 12, 2008 13:57    

My b2evolution Version: 2.4.x

I'm stuck trying to determine the correct url to access an icon in my rsc/icon directory. This may be complicated by the fact the blog is set to absolute url and and the absolute url is parked to another domain.

I have a domain, www.thewildlifeporch.com, parked at www.softwarefemme.com. The blog at thewildlifeporch.com runs by absolute url, and b2e is installed at the root.

When I enter,

[url=http://www.thewildlifeporch.com/rsc/icons/feed-icon-12x12-light-orange.png]http://www.thewildlifeporch.com/rsc/icons/feed-icon-12x12-light-orange.png[/url] = thewildlifeporch.com/rsc/icons/feed-icon-12x12-light-orange.png

it doesn't work, turning into

[url=http://www.thewildlifeporch.com/?/rsc/icons/feed-icon-12x12-light-orange.png]http://www.thewildlifeporch.com/?/rsc/icons/feed-icon-12x12-light-orange.png[/url] = thewildlifeporch.com/?/rsc/icons/feed-icon-12x12-light-orange.png

What's the correct url?

I want to use the correct url to access the icon from a Free HTML widget for the blog.

Any ideas?

Thanks,

Cindy Rae

*edit*
URLs

2 Mar 12, 2008 15:05

Hi CindyRae,

From within widgets and plugins you use one of the several variables where paths are stored. That will internally generate an absoulte path from the root of your server. This snippet is from the smilies plugin to demonstrate:

		global $admin_skin, $adminskins_path, $adminskins_url, $rsc_path, $rsc_url, $skin, $skins_path, $skins_url;

		// set the skin path/url and the default (rsc) path/url
		$currentskin_path = ( is_admin_page() ? $adminskins_path.$admin_skin.'/rsc' : $skins_path.$skin ).'/smilies/';
		$currentskin_url = ( is_admin_page() ? $adminskins_url.$admin_skin.'/rsc' : $skins_url.$skin ).'/smilies/';
		$default_path = $rsc_path.'smilies/';
		$default_url = $rsc_url.'smilies/';

Good luck

3 Mar 14, 2008 00:50

Guess I was confusing. :-/

Actually, I wasn't talking about plugin or widget code; I was referring to using the built-in Free HTML widget.

I want to add my own Free HTML via the built-in Free HTML widget from the back office. The free html I want to add references an image in the rsc directory, and I don't know how to do so correctly with my parked domain.

For example,

<li><a href="http://www.thewildlifeporch.com?tempskin=_rss2"><img src="http://www.thewildlifeporch.com/rsc/icons/myrssfeedicon.gif"/>RSS Feed</a></li>

does not work as free html. Neither does

<li><a href="http://www.thewildlifeporch.com?tempskin=_rss2"><img src="rsc/icons/myrssfeedicon.gif"/>RSS Feed</a></li>

I could write my own widget to do this, but it's frustrating to go to those lengths instead of just dumping it into a Free HTML widget in the backoffice.

Thanks,

Cindy Rae

5 Mar 14, 2008 01:02

Free HTML is for HTML but ?tempskin=_rss2 is PHP stuff, so yeah it's not going to work that way.

Visit your page in a browser. Point to the image you want. Right click and select "properties". Now copy the "Location" bit and paste that into your free HTML block. That should work...

6 Mar 14, 2008 02:52

Okay, don't ask me what was broken originally that had me stumped for so long... but it works now.

Thanks for the responses, guys.

You can see this in action at www.thewildlifeporch.com.

I added the free html to the menu section of my skin.

The free html:


<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.thewildlifeporch.com?tempskin=_rss2">
<img src="http://www.thewildlifeporch.com/rsc/icons/feed-icon-12x12-light-orange.png" alt="" />&nbsp;
RSS Feed</a>
</li>

(Yes, the "nbsp;" isn't pretty, but I'll get around to styling the free html later).

Hope this saves someone else some time,

Cindy Rae


Form is loading...