Forum

 

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 3 characters - maximum search word length is 84 characters

Topic RSS
From Preacher to Speaker
16 June, 2010
8:17 pm
RaffiBearmant
Member
Forum Posts: 8
Member Since:
15 June, 2009
Offline

Could you please instruct me how to globally change "preacher" to "Speaker" at least as the visitor sees it.

Thank you

RBembarassed

17 June, 2010
5:45 am
Rich Brown
Guru
Forum Posts: 295
Member Since:
13 July, 2009
Offline

Edit frontend.php. Change it in 2 places:

'Preacher' => 'preacher',

and

<td class="fieldname"><?php _e('Preacher', $sermon_domain) ?></td>

. Don't change the one that I did not bold.

Rich Brown Aisquith Presbyterian Church Parkville, Maryland, USA sermons.aisquith.org
17 June, 2010
8:54 am
RaffiBearmant
Member
Forum Posts: 8
Member Since:
15 June, 2009
Offline

Did that and it still says preacher in the filter and everywhere else???cryu

17 June, 2010
7:54 pm
Rich Brown
Guru
Forum Posts: 295
Member Since:
13 July, 2009
Offline

Hmm I will check again when I get home but I think that's all I had to do. If anyone else wants to jump in that would be great.

Rich Brown Aisquith Presbyterian Church Parkville, Maryland, USA sermons.aisquith.org
23 June, 2010
11:39 pm
Rich Brown
Guru
Forum Posts: 295
Member Since:
13 July, 2009
Offline

RaffiBearmant said:

Did that and it still says preacher in the filter and everywhere else???cryu

Can you send me an URL to your site?

Rich Brown Aisquith Presbyterian Church Parkville, Maryland, USA sermons.aisquith.org
24 June, 2010
3:31 pm
DmdStar
Guru
Forum Posts: 84
Member Since:
19 November, 2009
Offline

I wonder if, perhaps, you have it cached? Could you clear your browser cache (under Tools->Internet Options in IE), and if you are using Wordpress caching plugin, you may would need to reset that as well.

Then, you would likely need to close the browser and log in fresh.

Just a thought…

Matt Schlueter, Multimedia Director
Dodgeville United Methodist Church -- Dodgeville, WI
11 November, 2010
1:50 pm
GrammaLindaS
Member
Forum Posts: 4
Member Since:
10 November, 2010
Offline

I'm trying to accomplish the same thing, but having trouble with the One-click filter.

I've made the recommended changes in frontend.php, and it works fine if I use the Drop-down filter type. However, with the One-click filter type, the label "Preacher" is still displayed when that filter is active. I have cleared my cache several times, so that is not the problem.

I would rather use the One-click filter type. How can I change "Preacher" to "Speaker" for the One-click filter type?

(My test site is password-protected, so I cannot readily send a link.)

11 November, 2010
4:59 pm
Ben Miller
Moderator
Forum Posts: 383
Member Since:
18 June, 2009
Offline

I've found something you can try if you like. I haven't tried it myself.

First the disclaimer: Always make a backup of your files and your database first before making changes to the PHP code, especially if you are not all that comfortable in PHP programming.

Okay, in frontend.php, inside the sb_print_filters function, find the following line:

sb_print_filter_line ('preacher', $preachers, 'id', 'name', 7);

Change it to:

sb_print_filter_line ('speaker', $preachers, 'id', 'name', 7);

If you decide to try this, let us know how it turns out.

Ben Miller
Pathways Church, Appleton, WI, USA
13 November, 2010
12:36 am
GrammaLindaS
Member
Forum Posts: 4
Member Since:
10 November, 2010
Offline

Ben-Thanks for your suggestion. Though it didn't work, I do believe the solution is in the sb_print_filters function. Around line 853, find this line followed by a nested if-then-else statement:

if ($filter['filter'] == 'oneclick') {

I'm not very good at php syntax, but I think adding another if-then-else option to this statement would work. It should be similar to the following:

if ($filter_option == 'preacher') {
$output .= '<strong>Speaker</strong>:&nbsp;';

I would really appreciate help with the php syntax on this.

13 November, 2010
4:36 am
Ben Miller
Moderator
Forum Posts: 383
Member Since:
18 June, 2009
Offline
10

GrammaLindaS, I think I got it. In addition to the change I suggested above, you also need to make these changes to frontend.php:

In function sb_print_filters, find the code at around line 869:

} else {
$output .= '<strong>'.ucwords($filter_option).'</strong>:&nbsp;*'.$filter_option.'*';
$output .= '&nbsp;(<a href="'.sb_url_minus_parameter($filter_option).'">x</a>)';

Just before these lines, insert the following lines:

} elseif ($filter_option == 'preacher') {
$output .= '<strong>Speaker</strong>:&nbsp;*'.$filter_option.'*';
$output .= '&nbsp;(<a href="'.sb_url_minus_parameter($filter_option).'">x</a>)';

Next, in function sb_print_filter_line, find the following code around line 761:

echo '<a href="'.sb_build_url(array($id => $result->$filter)).'">'.stripslashes($result->$display).'</a>&nbsp;('.$result->count.')';

Just before this line, insert the following lines:

if ($id == 'speaker') $id_adj = 'preacher';
else $id_adj = $id;

Then substitute "$id_adj" in place of "$id" in the line you found above, so the new line is:

echo '<a href="'.sb_build_url(array($id_adj => $result->$filter)).'">'.stripslashes($result->$display).'</a>&nbsp;('.$result->count.')';

That seemed to work for me. With this solution, the word "preacher" still shows up in the URLs, but the word "speaker" appears on the page.

Let me know if it works for you.

Ben Miller
Pathways Church, Appleton, WI, USA
13 November, 2010
11:20 am
GrammaLindaS
Member
Forum Posts: 4
Member Since:
10 November, 2010
Offline
11

It works like a charm! Thank you so much for your help.

Forum Timezone: Europe/London

Most Users Ever Online: 40

Currently Online:
16 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

malpan - 2453

jogen - 2440

VanWatterson - 652

GeraldSebring - 364

LucasWoltman - 362

RandellFeenstra - 362

Member Stats:

There have been 7 guest posters

There are 1936 members

There are 1 moderators

There are 1 admins

Forum Stats:

Groups: 1

Forums: 2

Topics: 971

Posts: 3747

Newest Members: twinton, ellison13579, Daigh, mchunful, jesua, LGRG Design

Moderators: Ben Miller (383 )

Administrators: Mark Barnes (425)

 

Comments are closed.