What is straight link to any page of search results in Yahoo? - search

Essential is that my app parses the results of search from Yahoo!. There was easy to define that to get first page I need to from the next URL
http://search.yahoo.com/search;_ylt=A0oG7l7PeB5P3G0AKASl87UF?p=<My_Keyword>
but what's straight link to any other page from yahoo! search page ? If to see on link there is
a href="/search;_ylt=A0oG7mulOyVP3FMAnPlXNyoA?p=java&fr=404_web&fr2=sb-bot&xargs=0&pstart=1&b=11&xa=U7cN_L3AOtj18W09Ud7SkA--,1327926565" title="Results 11 - 20" id="yui_3_3_0_1_1327840165621204"
but where is this some param, changing that I can to go to the next page or just to 10 page, for example? Does somebody know about this feature of yahoo?
By the way, YouTube hasn't such problem, his links are very simple, but Yahoo...
UPD Seems to be I defined this params - this is "b=11". Second page has "b=21", the third - "b=31" and so on

Link directly to specific pages by setting the offset (b) correctly.
Yahoo currently shows 10 results on each page, therefore use the following offset:
offset = 10 x pagenumber - 9
Quick example based on the URL you provided:
http://search.yahoo.com/search;_ylt=A0oG7l7PeB5P3G0AKASl87UF?p=<My_Keyword>
Page 1 (offset = 10 x 1 - 9 = 1)
http://search.yahoo.com/search;_ylt=A0oG7l7PeB5P3G0AKASl87UF?p=<My_Keyword>&b=1
Page 2 (offset = 10 x 2 - 9 = 11)
http://search.yahoo.com/search;_ylt=A0oG7l7PeB5P3G0AKASl87UF?p=<My_Keyword>&b=11
Page 3 (offset = 10 x 3 - 9 = 21)
http://search.yahoo.com/search;_ylt=A0oG7l7PeB5P3G0AKASl87UF?p=<My_Keyword>&b=21
Note:
I don't know the future, but currently the links above work fine.
Yahoo might change the URL structure any time.

What is the role of this parameter "_ylt" ?
I think there is no problem to ignore it.
Yahoo in different country have different content of "_ylt".
And the HTTP has been changed to https://, not http:// .
Taiwan:
https://tw.search.yahoo.com/search?p=soqi+bed&fr=yfp&ei=utf-8&v=0
https://tw.search.yahoo.com/search;_ylt=A8tUwZBhGxlU93YAZHJr1gt.?p=soqi+bed&ei=utf-8&fr=yfp&b=11&pstart=2
US(eng):
https://search.yahoo.com/search;_ylt=AiVNJTPKVpm9Jag8U.STVL6bvZx4?p=soqi+bed&toggle=1&cop=mss&ei=UTF-8&fr=yfp-t-329&fp=1
https://search.yahoo.com/search;_ylt=AwrSbDzyGRlUoG0AUn1XNyoA?p=soqi+bed&ei=UTF-8&fr=yfp-t-329&fp=1&b=11&pstart=7
Japan:
http://search.yahoo.co.jp/search;_ylt=A7dPKW9aHBlUDm4A5b2JBtF7?p=soqi+bed&search.x=1&fr=top_ga1_sa&tid=top_ga1_sa&ei=UTF-8&aq=&oq=&afs=
http://search.yahoo.co.jp/search?p=soqi+bed&tid=top_ga1_sa&ei=UTF-8&pstart=1&fr=top_ga1_sa&b=11

Related

Code not saving when trying to wrap promoted tiles in SharePoint Online

Apologies for another question re this, but I've tried so hard to get this working (I'm fairly new to SharePoint, don't have extensive coding knowledge, but know HTML and generally alright at trouble shooting).
We are using SharePoint online and we have SharePoint Tiles. We have recently added a few more tiles and it's obviously not wrapping these tiles, thus having to scroll right to access some.
I have found the code for wrapping the tiles here and when editing the page source, it appears to be working... until I save it. The code I put in is stripped out when I next go to the content editor.
I've read a few pages on it and have tried things such as the content editor web part, but for the life of me cannot get it to work.
If anyone would know if there's a step to step guide to ensure wrapped tiles are saved, I may be able to get it to work.
Any help is greatly appreciated.
If it changes anything, we use SharePoint online that is part of our Office 365 account.
Add the following code into script editor web part in the page.
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
// Update this value to the number of links you want to show per row
var numberOfLinksPerRow = 6;
// local variables
var pre = "<tr><td><div class='ms-promlink-body' id='promlink_row_";
var post = "'></div></td></tr>";
var numberOfLinksInCurrentRow = numberOfLinksPerRow;
var currentRow = 1
// find the number of promoted links we're displaying
var numberOfPromotedLinks = $('.ms-promlink-body > .ms-tileview-tile-root').length;
// if we have more links then we want in a row, let's continue
if (numberOfPromotedLinks > numberOfLinksPerRow) {
// we don't need the header anymore, no cycling through links
$('.ms-promlink-root > .ms-promlink-header').empty();
// let's iterate through all the links after the maximum displayed link
for (i = numberOfLinksPerRow + 1; i <= numberOfPromotedLinks; i++) {
// if we're reached the maximum number of links to show per row, add a new row
// this happens the first time, with the values set initially
if (numberOfLinksInCurrentRow == numberOfLinksPerRow) {
// i just want the 2nd row to
currentRow++;
// create a new row of links
$('.ms-promlink-root > table > tbody:last').append(pre + currentRow + post);
// reset the number of links for the current row
numberOfLinksInCurrentRow = 0;
}
// move the Nth (numberOfLinksPerRow + 1) div to the current table row
$('#promlink_row_' + currentRow).append($('.ms-promlink-body > .ms-tileview-tile-root:eq(' + (numberOfLinksPerRow) + ')'));
// increment the number of links in the current row
numberOfLinksInCurrentRow++;
}
}
});
</script>
We can also use CSS style below in script editor web part in the page to achieve it.
<style>
.ms-promlink-body {
width: 960px;
}
</style>

Update max_page in jqpagination

I have 1001 entries to be shown .. I have a dropdown box listing how many entries to be shown per page . (10,20,30,40,50). Initially i show 10 entries per page so the number of pages would be 101 .The text content initially shows page 1 of 101. Now when i change the number of entries to be shown per page to 20 , an javascript function is called and the max_page is set to 51 in tht function and text content is showing page 1 of 51 . Upto this its working fine . Now when i click on the last button , it shows the text content as page 101 of 101 ..instead of page 51 of 51 .. further clicks on it are showing wrong values .
$(document).ready(function()
{
$('.pagination').jqPagination({
link_string : '/?page={page_number}',
max_page :total_pages,
paged : paging
});
});
$("#items").change(function(){
$('.pagination').jqPagination({
max_page : total_pages
});
});
You need to update the max page (as follows) instead of re-instantiating the plugin.
$('.pagination').jqPagination('option', 'max_page', 51)

rootline not working with TYPO3 4.5 menus

I'm having problems with TYPO3. I have been using it for quite a few years, since version 3.8 but this is my first site using version 4.5 and I am having problems with the menus and the rootline.
I believe it is related to how the rootline is created. using the code below for the breadcrumb/path type of menu only the current page is displayed. The menu only displays page X using example and code below when in page X and it should be
home > section 1 > sb a > page X
home
--- section 1
------- sub A
---------- page X
--- section 2
Also when displaying menus the ACT state isn't being properly activated. As I understand every page in the path/rootline should activate the ACT state and it is not happening with code below.
Has any thing changed in this version?
I have used both piece of codes in many sites up to now in version 4.5
codes
temp.breadcrumbs = HMENU
temp.breadcrumbs.special = rootline
#temp.breadcrumbs.includeNotInMenu = 1
#temp.breadcrumbs.special.range= -2 | -1
temp.breadcrumbs.special.range = 0
temp.breadcrumbs.1= TMENU
temp.breadcrumbs.1.noBlur = 1
temp.breadcrumbs.1.NO.allWrap= | > |*||*| |
## with and without line ... special.range ...
.....
....
temp.topmenu.1 {
wrap = <ul>|</ul>
# NO.allWrap = <li>|</li>
expAll = 1
NO.wrapItemAndSub = <li>|</li>
# Enable active state and set properties:
ACT = 1
ACT.wrapItemAndSub = <li class="current-menu-item">|</li>
}
temp.topmenu.2 = TMENU
temp.topmenu.2.noBlur = 1
temp.topmenu.2 {
wrap = <ul class="sub-menu">|</ul>
NO.linkWrap = <li>|</li>
# Enable active state and set properties:
ACT = 1
ACT.linkWrap = <li class="active">|</li>
#ACT.allWrap = <li class="selected">|</li>
#ACT.ATagBeforeWrap = 1
}
thanks
Ivan.
as cascaval wrote it's quite common to declare begin and end levels, anyway 0 value is aceptable too, as written in doc for entryLevel
Default is "0" which gives us a menu of the very first pages on the site.
Probably you put some TypoScript on the page X which has Rootlevel field checked, so it avoids traversing the tree up-side. I examined your sample code on first implementation I had available and it works as expected.
The range is supposed to be defined as [begin-level] | [end-level] so try:
temp.breadcrumbs.special.range = 0|-1
...or...
temp.breadcrumbs.special.range = 1|-1
-1 means current page.
-2 means the page one level up from the current page.
NOTE: You should probably set temp.breadcrumbs.includeNotInMenu = 1 because usually you would like to have all the pages in the breadcrumbs (as the structure that breadcrumbs represent wouldn't otherwise make sense), that is including those that you don't want to appear in other menus.
Had the same problem in Typo3 6.2.14 and finally found a solution.
After clearing "Template on Next Level" rootline worked perfectly.
Reason:
the root template was referenced in root templates "Template on Next
Level".
Solution:
edit root template
switch to tabfolder "Options"
clear field "Template on Next Level"

Why CodeIgniter Pagination Link Bloats?

I have spent some time but can't figure out what's wrong. I am using CodeIgniter 2.1.0.
So basically its like this:
My pagination settings:
$config['base_url'] = base_url() . '/stores/';
$config['total_rows'] = $this->stores_model->getTotalRows();
$config['per_page'] = 20; //display 20 rows per page
$config['num_links'] = 10; //display 10 pagination links
$config['uri_segment'] = 2;
$config['full_tag_open'] = '<div id="pagination">';
$config['full_tag_close'] = '</div>';
$this->pagination->initialize($config);
I am getting data chunks like this from controller. Which is also working.
$data['stores'] = $this->stores_model->getChunks($config['per_page'], $this->uri->segment(2));
My view page have:
<?php echo $this->pagination->create_links(); ?>
Now everything is working fine. At first the 10 pagination links are shown but when I click on the link 8, 9 or 10 etc. the pagination links bloats. It shows now links 1 to 20. Why is that? It might be something very simple but can't seem to figure that out. I was expecting the pagination links kind of scroll but shows only 10 links as I have set in config.
Thanks and regards
Deepak
Now I understand
$config['num_links'] got me confused for a while.
This means the number of links to show on both sides (previous and next) of current link.
ie. (show prev 10 links from current) <----- [current page] -----> (show next 10 links from current)
setting it to 5 solved the problem. Now I have about 11 links showing in total all the time as expected.
Thanks again
Deepak

Bookmarklet approach

I am trying to write a bookmarklet that will bookmark the current page and save the link to the current page in a backend service. When I click this bookmarklet, I want this bookmarklet to show up as a small popup on the top right in browser tab (attach iframe to existing page). This popup will have options to bookmark current page. Also, there will be options search my bookmarks, tag, etc in this popup.
So far, I have not seen any such bookmarklets (from delicioius, pinboard,etc). Although there are bookmarklets to post links to various services, they don't let you search, see the existing list of bookmarks within in the same popup. User is forced to go to the bookmarking site in a new tab to search, etc.
I am wondering is there a reason why bookmarklets (popup within existing page) like this are not done? Are there any security reasons for this? Or will be be blocked by adblockers?
Have a look at these bookmarklets http://googlesystem.blogspot.com/2007/07/useful-google-bookmarklets.html
javascript: (function() {
var a = window,
b = document,
c = encodeURIComponent,
d = a.open("http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=" + c(b.location) + "&title=" + c(b.title), "bkmk_popup", "left=" + ((a.screenX || a.screenLeft) + 10) + ",top=" + ((a.screenY || a.screenTop) + 10) + ",height=420px,width=550px,resizable=1,alwaysRaised=1");
a.setTimeout(function() {
d.focus()
},
300)
})();

Resources