I would like the search form to defaults to TOPICS again.

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

I would like the search form to defaults to TOPICS again.

Post by luis »

This is a feature request but it's about the forum software so I'm posting it here, hope someone will read it anyway !

The recent update changed the behaviour of this page:

Code: Select all

http://www.purebasic.fr/english/search.php
In the previous version the default for

Code: Select all

Display results as:  	 (*) Posts  () Topics
was on Topics, now is on Posts.

Could be possible to restore the original settings ? I found more logical the default to Topics as it return less rows and one can click the wanted thread to examine in detail the contents. The Posts choice in contrast returns a lot of data very often not pertinent or simply redundant.

Now I have to remember every time to click on the other option.

Can I have the search function as it was before ?

Thank you


This is for the request. But since I'm not the type who rely exclusively on other people's work I found a solution for myself and it's based on the Greasemonkey addon for Firefox.

So I wrote a script that change the new default to my preferred choice every time I enter in the search page.

If someone else is suffering like myself for all this, here is the script for you:

Code: Select all

// ==UserScript==
// @name           PB forum FIX
// @namespace      http://luis.no-ip.net
// @description    Fix for the search options in the new PB forum
// @include        http://www.purebasic.fr/english/search.php
// ==/UserScript==

(function () {
 
  if (!document.getElementsByName('sr')) return;
  
  var items = document.getElementsByName('sr');  
  
  for (var k = 0; k < items.length; k++) {
  
	if (items[k].value == 'posts') {
		items[k].checked = '';
    }

	if (items[k].value == 'topics') {
		items[k].checked = 'checked';
	}
	
 }

})();
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: I would like the search form to defaults to TOPICS again.

Post by luis »

Forgot to say, you can customize the forum appearance the same way.

All you need to do is to load the style sheet used by the forum to examine it and create a script where you redefine what you don't like.

This is an example changing the font used inside the body of the post.

Code: Select all

// ==UserScript==
// @name           PB Forum Customizer
// @namespace      http://luis.no-ip.net
// @description    Change the styles used in the PB forum
// @include        http://www.purebasic.fr/english/*
// ==/UserScript==

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

addGlobalStyle('.postbody { ' +
 'color: red; ' +  // new			
 'font-family: "Comic Sans MS" ! important; ' + 	// original was "Lucida Grande"
 'font-size: 2em ! important; ' + // original was 1.3em
 'line-height: 1.5em ! important; ' +  // original was 1.4em
 '}');

A more real-life example:

Code: Select all

// ==UserScript==
// @name           PB forum
// @namespace      http://luis.no-ip.net
// @description    My modifications for the PB forum (subsilver2)
// @include        http://www.purebasic.fr/english/
// ==/UserScript==

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

/* Original settings for subsilver 2 taken from the forum style sheets

a.forumlink {
	color: #000000;
	font-weight: bold;
	font-family: "Lucida Grande", Helvetica, Arial, sans-serif;
	font-size: 1.2em;
}

a.topictitle {
	margin: 1px 0;
	font-family: "Lucida Grande", Helvetica, Arial, sans-serif;
	font-weight: bold;
	font-size: 1.2em;
}

.row1 {
	background-color: #ECECEC;
	padding: 4px;
}

.row2 {
	background-color: #DCE1E5;
	padding: 4px;
}

.codecontent {
	direction: ltr;
	margin: 0 5px 10px 5px;
	padding: 5px;
	border-color: #A9B8C2;
	border-width: 0 1px 1px 1px;
	border-style: solid;
	font-weight: normal;
	color: #006600;
	font-size: 1.0em;
	font-family: Monaco, 'Courier New', monospace;
	background-color: #FAFAFA;
}

*/

addGlobalStyle(
'a.forumlink { ' +
'color: #c02020 ! important ;' + 
'font-family: "Tahoma" ! important ;' + 
'}' +

'a.topictitle { ' +
'color: #000060; ' +
'font-family: "Tahoma" ! important ;' + 
'}' +

'.row1 { ' +
'background-color: #f0f0f0 ! important ;' + 
'}' +

'.row2 { ' +
'background-color: #d8e8e8; ! important ;' + 
'}' +

'.codecontent { ' +
'font-family: "Dina" ! important ;' +  // http://www.donationcoder.com/Software/Jibz/Dina/index.html
'}'
);

'! important ' must be used when you redefine an attribute to make yours count over the original one.
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: I would like the search form to defaults to TOPICS again.

Post by Vera »

Hi luis,

I'd like to say thanks, :D
'cos your thread gave me the last hints I've needed to start working out some style-adjustments and I've posted two examples here: Board-Style - additional customized

cheers ~ Vera
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: I would like the search form to defaults to TOPICS again.

Post by luis »

Hi Vera, I'm happy it was of some use to you !

Cheers.
"Have you tried turning it off and on again ?"
A little PureBasic review
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: I would like the search form to defaults to TOPICS again.

Post by Mistrel »

I agree that results as posts for the default isn't as useful as topics.
Post Reply