[Pro] catch actual URL in address bar?

Hello. I have a button with a link than need to capture the actual URL, because on this way, I just insert the button once in a webyep menu item. The link should be like:

http://www.domain.com/test.php?u=activeurl

so then, depend on the loop item, the final link should be, for example

http://www.domain.com/test.php?u=http://www.news.php?DOC_INST=1

http://www.domain.com/test.php?u=http://www.news.php?DOC_INST=2

Hope you understand me

Thanks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Where is this “actual URL” coming from in this case? Is the link part of the WebYep content, or is it in the HTML you generate with Freeway to surround the WebYep content? Also, you will have to escape the colon-slash-slash part of that segment, along with the question mark, because those characters and character sequences may only appear once in a URL. It would have to read: http%3A%2F%2Fwww.example.com%3FDOC_INST%3D1 in your code. The server would figure it out.

Walter

On Dec 30, 2011, at 8:25 AM, rakeljuice wrote:

Hello. I have a button with a link than need to capture the actual URL, because on this way, I just insert the button once in a webyep menu item. The link should be like:

http://www.domain.com/test.php?u=activeurl

so then, depend on the loop item, the final link should be, for example

http://www.domain.com/test.php?u=http://www.news.php?DOC_INST=1

http://www.domain.com/test.php?u=http://www.news.php?DOC_INST=2

Hope you understand me

Thanks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Well, Ill explain again with the example. In this page http://www.i-tek.es/demoweb/guiagente/docs/boletin.php?DOC_INST=1 I have a webyep menu on left and the content in loop on right. I need this content to be shared in facebook. I added a grey/blue coloured button to link to facebook, and I have two problems:

  1. In this link, if I set http://www.i-tek.es/demoweb/guiagente/docs/boletin.php?DOC_INST=1 it always link the first item menu, and I woluld like to write a general link that catch the actual url, so it catchs the actual menu item, like http://www.i-tek.es/demoweb/guiagente/docs/boletin.php?DOC_INST=2

  2. In this link, the only text that is sent to facebook is from the first element in the loop, not the rest.

Hope make me understand better

Thanks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I get it. Looks pretty simple to fix. For your home-brew “share” button, here’s all you need to do (and this will be the same for all of these buttons, no matter what page you put them on):

Open the Edit/Hyperlink dialog, switch to the External tab, and enter either a single octothorp (#) or the word javascript: (with the colon following) in the URL field. Press the Extended button in the Hyperlink dialog, and press New in the sub-dialog. In the sub-sub-dialog that appears, enter the following:

Name: onclick
Value: window.location.href = 'http://www.facebook.com/sharer.php?u=' + encodeURIComponent(window.location.href);

(Name and Value above are just to show you where to put them, don’t actually type them. And if the Value line got broken into two, make it a single line. I’m trying to work around the script formatter here; even though I wrote it, I still get things wrong sometimes.)

What this does is take the current page URL from the browser, convert it into a “safe” value that can be passed in the request back to Facebook, and add it to the fixed endpoint at Facebook where the sharer script lives. You won’t need to worry about anything in WebYep or Freeway once you get this working – you can simply copy and paste that blue-gray box wherever you like and the link will carry along. As I said at the beginning, this will work on any page you want to share.

Walter

On Dec 30, 2011, at 9:46 AM, rakeljuice wrote:

Well, Ill explain again with the example. In this page http://www.i-tek.es/demoweb/guiagente/docs/boletin.php?DOC_INST=1 I have a webyep menu on left and the content in loop on right. I need this content to be shared in facebook. I added a grey/blue coloured button to link to facebook, and I have two problems:

  1. In this link, if I set http://www.i-tek.es/demoweb/guiagente/docs/boletin.php?DOC_INST=1 it always link the first item menu, and I woluld like to write a general link that catch the actual url, so it catchs the actual menu item, like http://www.i-tek.es/demoweb/guiagente/docs/boletin.php?DOC_INST=2

  2. In this link, the only text that is sent to facebook is from the first element in the loop, not the rest.

Hope make me understand better

Thanks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

doesnt work with the # neither javascript: …

screen capture of what ive done: http://www.i-tek.es/loquebuscas/pantalla.jpg


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

so … i want to use mals ???

____ yes ! - it works great !

____ no !! - peter, you’re a fool, it’s the GoDaddy of e-commerce. we wish mals was stripped of it’s flesh, rolled in salt while forced to search the web using Catalan, and then tossed into the flames of Hell.

so, i’m just asking …

cheers,
peter v.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

dont understand anything of this said by peter vacco…

waltd, im sure Ive put something wrong to ask for the javascript code but i think followed your steps. Just I delete the spaces, to try if it is the cause it didnt work, but is the same…

http://www.i-tek.es/loquebuscas/pantalla.jpg


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I just tried it here with a #, and it seemed to work. It sent me immediately to Facebook and that redirected me to a sign-in page. I quit Facebook about a year ago, so I don’t have any way to see if it still works or not. I did not try to use the Target = _blank thing, though, so you may want to try removing that.

Click the red rectangle, if you dare: Untitled

Walter

On Dec 30, 2011, at 11:43 AM, rakeljuice wrote:

doesnt work with the # neither javascript: …

screen capture of what ive done: http://www.i-tek.es/loquebuscas/pantalla.jpg


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

should be a problem in the way im entering the code because i put it in other page http://www.i-tek.es/demoweb/guiagente/docs/contacto.php and it doesnt work. If see this source code and your page source code, its different. I think is something im entering wrong but dont know what


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

ok. First Problem FIXED !!

As I saw it was a problem in my code, satarted again and it works now. THANKS!!

Now, my second problem is that when you click the button, the content should be sent is the one of this piece of news, but it is always sent the first news content.

For example, in the page we are working whith, if you click the Matrix news, the content sent is the Ecoaldea one.

Ive put the button insideo the webyep loop


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The only thing being sent is the URL to the current page, not the content of that page. If it’s being “sent”, it’s just a fact of how Facebook is interpreting the page. What they are doing is “scraping” the page for HTML, and they must be grabbing the first DIV containing some meaningful text and calling it done. So no matter which button you pressed, you’re only going to get the first N characters of readable text from the page. What you’re going to need to do in order to give each favorite some unique content is to create a template page (using WebYep) that contains only the unique content for each story, and link to that. So if you made your WY page for the second story on the page have a URL in your site like detail.php?id=12345 (no idea what your URLs really look like, that’s just a guess), you would need to put that unique URL into the code I wrote, something like this:

window.location.href='http://www.facebook.com/sharer.php?u='+'<?php echo rawurlencode('http://yoursite.com/' . $yourPageUrlHere); ?>';

What that’s doing is putting the encoding and the URL in PHP in the midst of a line of JavaScript. You’ll have to figure out what WebYep calls the variable with the dynamic URL inside of a loop, and substitute that for my made-up variable, but once you know that, the button will work exactly the same way.

I would make these dynamic detail pages links from the headline in your loop content, too, so it’s not a big mystery to Google or human visitors what these detail pages are all about. Naturally, you would have links back to the main category page, and your global navigation, so that the visitors who come from Facebook will have context to understand where this story fits into your overall content picture.

Walter

On Dec 30, 2011, at 12:24 PM, rakeljuice wrote:

ok. First Problem FIXED !!

As I saw it was a problem in my code, satarted again and it works now. THANKS!!

Now, my second problem is that when you click the button, the content should be sent is the one of this piece of news, but it is always sent the first news content.

For example, in the page we are working whith, if you click the Matrix news, the content sent is the Ecoaldea one.

Ive put the button insideo the webyep loop


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hello Walter. Thanks for your explanation. Sincerelly, I have no idea where to start… Ill have a look.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

is to create a template page (using WebYep) that contains only the unique content for each story, and link to that.

what you mean is that I need to insert the content in the page, and in another page aswell (a new page for every item or history as you say) to take the info from that. But this pages should be automatically created, isnt it? Because, this is the idea of webyep, that you can add histories and histories, without creating new pages… On this way, the only think Ive saw is that you can set true or false if the content is just for one item or for others, but I cant see how to create this new page.

I think you are suggesting me something when you say

I would make these dynamic detail pages links from the headline in your loop content, too, so it’s not a big mystery to Google or human visitors what these detail pages are all about. Naturally, you would have links back to the main category page, and your global navigation, so that the visitors who come from Facebook will have context to understand where this story fits into your overall content picture.

but as I said, I have no idea about how. And i cant completely understand you. Do you mean I will not have the web section structure like now? Just with links?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

well, just to put my ideas on clear. The steps are, as I understood:

1st. create a new hidden page for every loop item. This page is automatically created when you insert a new loop item. This page is hidden, so you see the loop content as its shown now.

2nd. In the main page add the code below to the share button. This code refers to the hidden page, so it will send the content of the item loop, not the content of the whole page.

So, how to approach first step? I ve been last two hours (before writting the first message today) looking around webyep and have no idea how to make this hidden page…


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hello Rakel
I have written to you directly (describing what I would need to do so you are able to create the hidden dynamically generated pages), so as long as the method of manually duplicating the loop contents is ok (it cant be done automatically), then I will create the example plus the adapted webyep action.
speak soon Max


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The current page with your content where your loop is contains mixed content for every looped story. Facebook at best will scrape the top of the page and leave other stories (thinking the whole page refers to similar content) So you would either have one set of content per WebYep page instance and moving your important content to the top of the page which is a good thing anyway. Or moving this unique content to another page. This would make your looped stories have the equivalent of a read more button to the unique content rather that as it is now (mixed content)

WebYeb can do this by…

  1. Create a new page in Freeway

  2. Set up this page with a H1 title and body text (all with WebYep editable text items)

  3. Create the link (from your page with the WebYep menu and loop) to this page by; adding an WebYeb image item the same size as a button say 50x100 pixels. In the Freeway/WebYep action pallets you can add a link to your content page you created in 2. Add this into your loop.

  4. Create a button graphic that is 50x100 pixels make it say “read more”. Or make a white gif to make an invisible link.

  5. Upload your sites and login to WebYeb. Upload your graphic into this looped image item and it creates a button to the new page in 1. Navigate to it and add your new content in WebYep.

Now every looped item on your looped page creates a new instance (URL) in WebYep to this unique content page which can be reached by a read more button. Or your Facebook link could link to it.

Perhaps this is a help to you.

David Owen
Freeway Friendly Web Hosting and Domains

On 2 Jan 2012, at 14:10, “rakeljuice” email@hidden wrote:

well, just to put my ideas on clear. The steps are, as I understood:

1st. create a new hidden page for every loop item. This page is automatically created when you insert a new loop item. This page is hidden, so you see the loop content as its shown now.

2nd. In the main page add the code below to the share button. This code refers to the hidden page, so it will send the content of the item loop, not the content of the whole page.

So, how to approach first step? I ve been last two hours (before writting the first message today) looking around webyep and have no idea how to make this hidden page…


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

That’s exactly what I was trying to say. Thanks for putting it more clearly!

Walter

On Jan 2, 2012, at 12:12 PM, David Owen wrote:

Now every looped item on your looped page creates a new instance (URL) in WebYep to this unique content page which can be reached by a read more button. Or your Facebook link could link to it.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

with this method, would I need to create a freeway page for every loop item? The page is supossed to be maintain by a person that havent got freeway, just via webyep…

Other way, I fell a bit sick today. Ill try to rest and have a try with this you say.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

WebYep has a method whereby you can create entire pages. You would create a single template page once only, and each instance of that page would be entirely assembled by WebYep.

Walter

On Jan 2, 2012, at 12:59 PM, rakeljuice wrote:

with this method, would I need to create a freeway page for every loop item? The page is supossed to be maintain by a person that havent got freeway, just via webyep…

Other way, I fell a bit sick today. Ill try to rest and have a try with this you say.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You only have two pages.

In Freeway you only have two pages. One with your menu and loop, the other this content page.

WebYep does all the rest for you.

The same thing is going on here: http://www.ackroyddent.co.uk/commercial-property-search.php?WEBYEP_DI=5

David Owen
Freeway Friendly Web Hosting and Domains

On 2 Jan 2012, at 17:59, “rakeljuice” email@hidden wrote:

with this method, would I need to create a freeway page for every loop item? The page is supossed to be maintain by a person that havent got freeway, just via webyep…

Other way, I fell a bit sick today. Ill try to rest and have a try with this you say.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options