Recent Topics

1 Dec 15, 2007 17:42    

My b2evolution Version: 1.10.x

Hello

I would like to show the permanent link in a text box rather than with the icon.

<input type="text" value="<?php $Item->get_permanent_url() ?>" size="55">

So far I have this code I have tried above, but it doesn't work. Anyone know how I can get the url to show in the text box for users to easily copy and paste?

Thanks
LadyEase

2 Dec 15, 2007 18:07

<div>
<code><?php $Item->get_permanent_url() ?></code>
<div>


Use this as a starting point. You can style this bit. I'd like to know the skin you are using and a link to your site. Then I can give you some more advise.

Good luck

3 Dec 15, 2007 18:28

My blog is not live yet... and I am using the nautica_05 skin, but editing it to suit my needs. I am trying to add the text box to the _feedback.php page just above the display trackback url ... but both our codes don't work, nothing appears.

4 Dec 15, 2007 18:45

<?php echo $Item->get_permanent_url(); ?>

;)

¥

5 Dec 15, 2007 18:47

Thank you very much ;)

6 Dec 15, 2007 20:04

Hi,

This URl is not going to look nice, it never will, it's an ugly URL.
Can you confirm if this code is doing what you want it to do. You can make a button out of it, like 'copy permalink'. But to start: does it work the way you want? This is the code:

<div><code><?php $Item->permanent_url( '', '', 'true', '&amp;' ); ?></code></div>

Good luck

7 Dec 15, 2007 20:54

Thanks for all your help.

This is what it looks like and it works perfectly for users to get the html code to paste it into their site/blogs or whatnot.

<h4>Link to this page:</h4>
<h4><input type="text" value='<a href="<?php echo $Item->get_permanent_url(); ?>"><?php $Item->title() ?></a>' size="70"></h4>

8 Dec 16, 2007 00:18

Hi LadyEase. That is a way-cool trick for showing a URL. Personally I think it's overkill for the permalink because all someone has to do is visit the permalink page and the URL is in their address bar, but it's really REALLY cool for showing the trackback URL (if you allow trackbacks) in a non-clickable manner. With your method of putting the URL into a text input field the visitor can easily double-click in the field to highlight only the actual URL, and the overall length of the URL won't matter because the text field will limit the size. Plus no one will be able to click on the link and wonder why it didn't work and wonder what kind of crazy web are you running over there.

Cool trick! Have a :cookie:

9 Dec 16, 2007 04:25

thanks.... we're on the same page... I did this for the trackback url first... works wonderfully!!!

<input type="text" value="<?php $Item->trackback_url() ?>" size="70">

When viewing my posts, I was having trouble highlighting the code to copy it... that told me I needed to change it, because if I had trouble I am sure my visitors would too.

thanks, glad you liked it! :D :D


Form is loading...