Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
To the top/bottom option and search option changes
Avatar
James Taylor
Member
Free Members
sp_UserOfflineSmall Offline
May 5, 2015 - 1:13 am

Hi,

I have just started using the simplepress plugin and think its great. However there are a few things I would like to tweak and was looking for the easiest solution. I have grouped a few questions into 1 topic as they were related when I was trying to resolve the first point:

1. Reboot theme, 'to the top/bottom' options - Is there a simple way to include the icon 'go to bottom' on a thread, and also in each reply the icon 'go to top'. I see this feature on other themes such as 'unified' but not on 'reboot', and think it is a useful feature where there is a long thread.

2. Advanced search function - how can the default 'forum option' be assigned to 'posts and topic titles' rather than 'posts only'?

3. Advanced search function - how can the minimum word search length be reduced or removed? When I was searching 'go to top' by 'phrase' it didn't seem to allow it as the word lengths were too short.  

Thanks

James

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 5, 2015 - 3:02 am

The first two changes mean modifications to theme templates. Things work more or less the same as they do for WordPress themes. To save the later problem of losing any customisations when we next update the main Reboot theme, we recommend making a Child Theme which will allow as much of Reboot to be updated as possible. I would strongly urge you to do that before we make the above changes.

If you agree, go ahead and do that first. You can download the Reboot Child Theme Framework from our download pages and use that as the basis. Full Codex details on what to do are avalable at https://simple-press.com/docum.....ild-theme/ but firstly just download, install and, if you want to, change the name details. Let me know when that is ready and we can make the desired alterations.

Next - if you can give me an idea of your PHP knpwledge/skill I will know how to describe the changes you want.

And finally on the subject of minimum word length in searches. This is not a restriction imposed by either Simple:Press or WordPress but a setting within your MySQL database engine and is, as far as I am aware, mandatory. However, you may be able to get it changed but you will have to ask your host and it will probably be down to them to make the change of they are willing, At least, I have never investigated a DIY option so assume it would have to be your host.

andy-signature.png
YELLOW
SWORDFISH
Avatar
James Taylor
Member
Free Members
sp_UserOfflineSmall Offline
May 5, 2015 - 3:22 am

Hi YellowSwordfish,

Thanks for your quick reply. I have installed the Reboot child theme.

Unfortunately my php knowledge is very limited at the minute. Despite reading up a bit on php, my practical knowledge is still basic. Happy to learn though.

Thanks

James

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 5, 2015 - 4:03 am

No problem. Just helps me know how to pitch the changes. But they are simple....

So you are going to need 2 templates from the parent Reboot (4 if you include the mobile phone templates). These need to be copied into their equivalent home in the child theme. These are:

/templates/desktop/spHeadDesktop.php (and optionally the mobile version as well)
/templates/desktop/spTopicViewDesktop.php (and again - the mobile version)

1: Advanced Search Form

Open the spHeadDesktop template. Near the top you will see a definition block entitled 'Search FORM - OBJECT DEFINITION'. The second from last entry is named 'searchIncludeDef' and is set to 1 by default. As you can see from the comment beside it - setting iot to 3 will force the form to default to posts and titles. Note also that this will slow searches a little.

2: Changing the Registration Form URL

This also requires a change to the spHeadDesktop template. Locate the template displat function that by default will be:

sp_RegisterButton('tagClass=spButton spRight', __sp('Register'), __sp('Register'));

You need to add an argument to this. It is named 'link'. Note the ampersand, no spaces. It has to be exact.

sp_RegisterButton('tagClass=spButton spRight&link=http://your-url-to-form', __sp('Register'), __sp('Register'));

Where - of course - the 'your-url-to-form' is replaced by the correct url.

3: Go To Top

This requires the spTopicViewDesktop.php template. The function you need to add is easy:

sp_GoToTop('tagClass=spRight spGoToTop&iconClass=spIcon', '', __sp('Go to top'));

About half way down the template you will find the comment 'Start the 'post' section. This contains all of the display function calls that make up the post content area. Just looking at the function names you can easily see what component each one displays. You can place the go to top function wherever you prefer.

andy-signature.png
YELLOW
SWORDFISH
Avatar
James Taylor
Member
Free Members
sp_UserOfflineSmall Offline
May 5, 2015 - 6:32 am

Thanks Yellow Swordfish. All worked. 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 5, 2015 - 6:32 am

Excellent. Thanks for the confirmation.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626