Yes, I never bothered to rewrite announcements. I will in a bit though This forum is a demo of this hack - another example is a forum I designed and coded, www.mod-rewrite.com/forum/
The quickstyle chooser is run via javascript using the following code:
[php]
function switch_styleid(selectobj)
{
var styleid = selectobj.options[selectobj.selectedIndex].value;
if (styleid == "")
{
return;
}
var url = new String(window.location);
var fragment = new String("");
// get rid of fragment
url = url.split("#");
// deal with the fragment first
if (url[1])
{
fragment = "#" + url[1];
}
// deal with the main url
url = url[0];
// remove styleid=x& from main bit
if (url.indexOf("styleid=") != -1 && is_regexp)
{
re = new RegExp("styleid=\\d+&?");
url = url.replace(re, "");
}
// add the ? to the url if needed
if (url.indexOf("?") == -1)
{
url += "?";
}
else
{
// make sure that we have a valid character to join our styleid bit
lastchar = url.substr(url.length - 1);
if (lastchar != "&" && lastchar != "?")
{
url += "&";
}
}
window.location = url + "styleid=" + styleid + fragment;
}
[/php]
I have no idea how to make it work properly so for now I must stick with [R] flags.
Yes, that makes much more sense! As to your question, that's because there are limited features available to the DaniWeb tutorial threads. The idea is that all replies be comments / responses to the original article.
I've been testing this on a new install, but for some reason I have the simple issue of "forumdisplay" is showing as the normal dynamic link, rather than the HTML form. It's probably a small mistake, but if there are any pointers to which part of the instructions I possibly messed up on, that would be most appreciated.
Look at all of the templates in the FORUMHOME template group and replace all occurrences of <a href="forumdisplay.php?..."> with <a href="$forum['url'].html">
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.