// SZ 2025-11-30 — override SMF expandPages for "..." pagination function expandPages(spanEl, base_link, first_page, last_page, per_page) { try { var per = parseInt(per_page, 10) || 1; // Try to derive the real maximum page count by inspecting the pagination links. var maxPage = 1; var container = spanEl && spanEl.closest ? spanEl.closest(".pagelinks") : null; if (container) { var links = container.querySelectorAll("a.nav_page"); var maxStart = 0; links.forEach(function (a) { var href = a.getAttribute("href") || ""; // Match the last . segment, e.g. topic=15206.7650 var m = href.match(/\.([0-9]+)(?:$|[^0-9])/); if (m) { var n = parseInt(m[1], 10); if (!isNaN(n) && n > maxStart) maxStart = n; } }); if (maxStart > 0) maxPage = Math.floor(maxStart / per) + 1; } // Fallback to SMF-provided last_page if DOM inspection failed. if (!maxPage || maxPage < 1) { var last = parseInt(last_page, 10); maxPage = Math.floor(last / per) + 1; if (!maxPage || maxPage < 1) maxPage = 1; } var input = prompt("Go to page (1-" + maxPage + "):"); if (input === null) return; var page = parseInt(input, 10); if (!page || page < 1 || page > maxPage) return; var start = (page - 1) * per; if (start < 0) start = 0; var url = base_link; // base_link may be an HTML string contain an tag; try to extract href try { var tmp = document.createElement("div"); tmp.innerHTML = base_link; var a = tmp.querySelector("a"); if (a && a.getAttribute("href")) { url = a.getAttribute("href"); } } catch (err) { url = base_link; } // Replace common SMF patterns with the computed offset if (url.indexOf("%1$d") !== -1) { url = url.replace("%1$d", start); } else if (url.indexOf(";start=") !== -1) { url = url.replace(/;start=\d+/, ";start=" + start); } else if (/\.0(?!\d)/.test(url)) { url = url.replace(/\.0(?!\d)/, "." + start); } window.location.href = url; } catch (e) { // fail silently } }

A Goodbye in Advanced

Started by Mikey, Apr 5, 2010 05:33 PM

Previous topic - Next topic

1 Guest

darkness shadow

Quote from: MikeyLevi on Apr  6, 2010 08:25 PM
Hopefully. :/
come on, cheer up, if there is a chance u might die, i'd rather you died happy, now cheer up, and live those what could be your last days to the fullest as they can possibly be
Signature
supa emeraldz

thnx rival, again
shineh emeraldz =D

Kirby

Come on dude. The fight's not over yet! Just keep believing in yourself, Levi. You'll make it through. I promise.

darkness shadow

Quote from: KirbySoul11 on Apr  6, 2010 11:11 PM
Come on dude. The fight's not over yet! Just keep believing in yourself, Levi. You'll make it through. I promise.
he's right, the fight ain over till there's only 1 man standing, don't let that illness be that "man" thats left standing
Signature
supa emeraldz

thnx rival, again
shineh emeraldz =D

TheGameNinja

D:


I hope you don't die, dude!!
Signature

Mikey

I guess you guys do have point, its just that I feel useless. I beat the disease with no cure three times and now I'm gonna die over some dinky liver. I just feel like I'm supposed to die.

CradledEggle

Don't say that, I'm alive, and I was supposed to die, along with my twin, and the doctor even said if I DID live, that i'd be retarded, and Im neither dead or retarded, you ARE going to live. There is a reason your here.
Signature
------
~Circa 2009; We were kids back then, just looking for a past time~

rockout909

trust us dude, you'll be fine, they'll find a donor and fix ya right up.

darkness shadow

look, giving up will only help it kill you, keep your will strong damnit
Signature
supa emeraldz

thnx rival, again
shineh emeraldz =D

Super Sonic Boom

Quote from: MikeyLevi on Apr  5, 2010 05:33 PM
I just hope a miracle happens and I get a doner in time.

Man, I hope that happens for you, I'll be praying for you man. *peace sign*

Mikey

Quote from: Super Sonic Boom on Apr  7, 2010 09:25 AM
Man, I hope that happens for you, I'll be praying for you man. *peace sign*
Thanks man.