I have created a function gets google suggestions and returns it in the same format. My opensearch.xml file is as below:
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:suggestions="http://www.opensearch.org/specifications/opensearch/extensions/suggestions/1.1">
<ShortName>example</ShortName>
<Description>example</Description>
<InputEncoding>UTF-8</InputEncoding>
<Url type="application/x-suggestions+json" template="https://<url>/meta_search/get_suggestions/?query={searchTerms}" method="get" />
</OpenSearchDescription>
When i type "iphone" in address bar using my site as search engine get this:
But when i type "iphone" in address bar using google as search engine get these suggestions:
How can get the same suggestions using my website as search engine?
Related
Thanks in advance for your answers I want to make google cloud storage links (storage.googleapis.com) to redirect to my own domain I've achieved that so far but when I add something like a picture that is hosted in one of my servers which is linked to this domain the google cloud storage link does not function well, explanaition :
For example my domain name example.com, which is linked to my google cloud account with this link https://storage.googleapis.com/example-test/example.html if I add anything after that like https://storage.googleapis.com/example-test/example.html#gOAdv.png it only redirect to the main domain example.com
This is the content of my example.html:
<meta http-equiv="refresh"content="0; url=http://myexampledomain.com/">
Note when I remove the # from the link (https://storage.googleapis.com/example-test/example.html#gOAdv.png)
it shows this error:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Details>No such object: example-test/example.html/gOAdv.png</Details>
</Error>
hello everyone i ve found the answer it was my way of thinking
<meta http-equiv="refresh"content="0; url=http://myexampledomain.com/">
this line was short and bad i needed to code it via another language to make it work.
Thanks to all.
I have written a eclipse plugin which will customize the eclipse welcome screen.
Below is the xml
> <?xml version="1.0" encoding="utf-8" ?> <introContent>
> <extensionContent id="comregistrationplugin-introExtension"
> style="css/sample.css" name="Sample Extension" path="overview/#">
> <group style-id="content-group"
> id="comregistrationplugin-introLink-group">
> <link label="Registration/Signup" url="" id="comregistrationplugin-introLink" style-id="content-link">
> <text>Click here to login.</text>
> </link>
> </group> </extensionContent> </introContent>
Once I click on the link, it opens up the url specified on the link in the web browser.
The url that I use is a sso url which will open up a login page . Once the user provides the email address the user will be logged in and and the api will return a response.
I need a way to capture the response without showing the response on the users browser. For ex, once the response is received I need a way to capture the response in the plugin and show a generic success message on the users browser.
Or is there a way to read the cookie once the login succeeds ?
You might be able to find the corresponding editor, and grovel through it to find the Browser and install your own listener. But you might be better off creating your own browser instance, either through a dialog or as a separate editor, so you can control the setup. I implemented something like this for the Eclipse User Storage Service.
I'm trying to write a script to search the PayPal PayFlow Reporting tool in ColdFusion and I'm stuck in the connection part of this. The response I'm getting back is this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<reportingEngineResponse>
<baseResponse>
<responseCode>110</responseCode>
<responseMsg>Invalid merchant account</responseMsg>
</baseResponse>
</reportingEngineResponse>
This is the exact same password combo I'm using to process payments so I know that the vendor,username, password, partner are all correct. I'm not sure if the XML isn't right, or if I'm sending the XML in incorrectly from BlueDragon (ColdFusion).
This is what my code currently looks like, and I'm trying to pull information from my recurring profile for this account ID.
<cfparam name="payPalServerSearch" default="https://payments-reports.paypal.com/reportingengine">
<cfsavecontent variable="req"><cfoutput>
<?xml version="1.0" encoding="UTF-8"?>
<reportingEngineRequest>
<authRequest>
<user>#payPalUsername#</user>
<vendor>#payPalVendor#</vendor>
<partner>#payPalPartner#</partner>
<password>#payPalPassword#</password>
</authRequest>
<runSearchRequest>
<searchName>RecurringBillingSearch</searchName>
<reportParam>
<paramName>profile_id</paramName>
<paramValue>I-1234567890</paramValue>
</reportParam>
<pageSize>50</pageSize>
</runSearchRequest>
</reportingEngineRequest>
</cfoutput></cfsavecontent>
<cfset req = trim(req)>
<cfhttp url="#payPalServerSearch#" method="post">
<cfhttpparam type="body" value="#req#">
</cfhttp>
You are passing in the profile ID parameter value of I-1234567890 and you are running Live environment based on the URL you are posting "https://payments-reports.paypal.com/reportingengine"
Is this a valid profile ID? I get that the Invalid Merchant account might not be the issue of Profile ID being passed as parameter, but can you try to make sure if it is valid one first and try to run the API call again?
I'm trying to connect to a REST web service with Drupal 7. Data is supplied via a url and I want to pull it into the D7 site to create and populate nodes. I'm using the feeds module to map the content and Web Service Client module to pull in the data but I'm unsure as to what to use as Data types to cut and split the data as I need it.
I have an address that looks like http://192.136.0.31:8080/places/getAll
The xml I get back when I use Chrome's Advanced Rest Client:
<ArrayOfAsset>
<Asset>
<Address1>01-02 Whatever Road</Address1>
<Address2>Whatever Town</Address2>
<City />
<Country>United Kingdom</Country>
<County>Whatevershire</County>
<HouseNumber>0001</HouseNumber>
<Id>01234ec0e-005456944567</Id>
<Latitude>58.828424</Latitude>
<LongTelephoneNumber>01543 534676</LongTelephoneNumber>
<Longitude>126.054688</Longitude>
<Name>Whatever the name is</Name>
<PostCode>WH01 7PU</PostCode>
<ShortName>Whatever</ShortName>
<Uri></Uri>
</Asset>
</ArrayOfAsset>
So, my question is how do I split/cut that data to return the parts I need in Clients module?
If there is anything else you need me to supply, let me know.
Update:
The xml exported via the web service, although looks like xml doesn't actually format the same.
The first line is is commented out in Chrome dev tools as if chrome is putting it there itself:
<!--?xml version="1.0" encoding="utf-8"?-->
Blank head tags
<head></head>
<body>
Then straight into the code above.
I was following this document from Liferay Website to work Map Firendly URL Mappings
http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/adding-friendly-url-mapping-to-the-portlet
I am using Liferay version=6.1.0
During HyperLink navigation , i was getting the following url
http://localhost:8080/web/guest/what-we-do?p_p_id=sai_WAR_Saiportlet&
p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1
&_sai_WAR_Saiportlet_jspPage=%2Fhtml%2Fsai%2Fedit.jsp
To modify the above i have tried to use Friendly URL Mapper and i have done the following way
Inside liferay-portlet.xml file .
<portlet>
<portlet-name>sai</portlet-name>
<icon>/icon.png</icon>
<friendly-url-mapper-class>com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper</friendly-url-mapper-class>
<friendly-url-mapping>sai</friendly-url-mapping>
<friendly-url-routes>com/test/sai-friendly-url-routes.xml</friendly-url-routes>
<instanceable>false</instanceable>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<css-class-wrapper>sai-portlet</css-class-wrapper>
</portlet>
Created a new file by name sai-friendly-url-routes.xml inside
D:\liferay-plugins-sdk-6.1.0-SNAPSHOT\portlets\Sai-portlet\docroot\WEB-INF\src\com\test\sai-friendly-url-routes.xml
The content inside sai-friendly-url-routes.xml is
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE routes PUBLIC "-//Liferay//DTD Friendly URL Routes 6.1.0//EN" "http://www.liferay.com/dtd/liferay-friendly-url-routes_6_1_0.dtd">
<routes>
<route>
<pattern>/{mvcPathName}</pattern>
<generated-parameter name="mvcPath">/{mvcPathName}.jsp</generated-parameter>
</route>
</routes>
But i observed there is no change in the url
http://localhost:8080/web/guest/what-we-do?p_p_id=sai_WAR_Saiportlet&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_sai_WAR_Saiportlet_jspPage=%2Fhtml%2Fsai%2Fedit.jsp
Please let me know where exactly i am doing mistake .
You leave the values as they are. That is, you leave {mvcPathName} and "mvcPath" as-is.
When the friendly URL is generated, it parses mvcPath (i.e., edit.jsp or view.jsp) from the URL and then the pattern is applied, replacing .../edit.jsp with .../edit.
This example works for the edit JSP. And it works for the view page; but NOT when clicking Save ... which is something I could look into. However, if you go to edit and then click the back link, the friendly URL will show for the view JSP.
I've created a ticket to complete this example so that it also goes to a friendly URL when clicking save. I'll update this section when we've made the fix.
Thanks.