Forum

This forum is now read-only. Support is provided at https://wordpress.org/support/plugin/sermon-browser/

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





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

sp_Feed Topic RSS sp_TopicIcon
Relative vs absolute URL on home page.
24 June, 2013
5:28 pm
Ben Meredith
Morrisville, NC, USA
Enthusiast
Members
Forum Posts: 22
Member Since:
18 June, 2013
sp_UserOfflineSmall Offline

This is attempt 3 to post this. The forum says I am using too many urls. so here's the only url, our home page: http://trinityparkchurch.org

Under "Most recent sermon" observe the difference between to urls of the preacher (Corey Jackson) and the book (john). The book archive link is defaulting back to the home page, not to the sermons page.

I've tinkered around with lines 39-43 of frontend.php, but I don't have enough php savvy to make it work. the main differences I see between the links is a "a href=\" before the sb_print_preacher_link function.

Help?

I'm perfectly willing in the context of this forum to be referred to as "Lesser Ben" in favor of Ben Miller.

I made a tutorial for prettying up your sermonbrowser iTunes feed.

Web Geek for Trinity Park Church.

26 June, 2013
6:07 am
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

I don't know if you've already made changes or not, but both the book link and the preacher link appear to be working correctly to me.  Is there still a problem?

Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12

26 June, 2013
1:35 pm
Ben Meredith
Morrisville, NC, USA
Enthusiast
Members
Forum Posts: 22
Member Since:
18 June, 2013
sp_UserOfflineSmall Offline

no, it's still broken. 

The book link works fine when entered correctly= " trinityparkchurch . com / resources / sermons / ?book=john " (without the spaces)

But on the home page, the url leaves out the " / resources / sermons " portion if I click on the word "John" 

I'm perfectly willing in the context of this forum to be referred to as "Lesser Ben" in favor of Ben Miller.

I made a tutorial for prettying up your sermonbrowser iTunes feed.

Web Geek for Trinity Park Church.

26 June, 2013
4:19 pm
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

I see the problem now.  Thanks.

Are you using the "recent sermons" sidebar widget for this, or are you using the "sb_display_sermons" function in your theme template?

Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12

26 June, 2013
4:25 pm
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

I'm assuming that you are using the sb_display_sermons function, because I found the bug.

In frontend.php, function sb_display_sermons, line 42, you'll see this code:

http://pastebin.com/GUniHy7F

We need to add another parameter to the call to function sb_get_books.  The new line will look like this:

http://pastebin.com/B49ztM1Z

 

Try this out and let me know if it works for you.  If it does, I'll make sure it gets put into the next version.

Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12

26 June, 2013
4:45 pm
Ben Meredith
Morrisville, NC, USA
Enthusiast
Members
Forum Posts: 22
Member Since:
18 June, 2013
sp_UserOfflineSmall Offline

Yes, that works. I knew it was line 42. I just don't know php well enough yet.

so, for learning's sake... if i had modified line 402 of that same document to change what that function calls, i could have achieved the same results?

I'm perfectly willing in the context of this forum to be referred to as "Lesser Ben" in favor of Ben Miller.

I made a tutorial for prettying up your sermonbrowser iTunes feed.

Web Geek for Trinity Park Church.

26 June, 2013
4:53 pm
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

Well, you wouldn't want to do that, because that function gets called in other places.  Sometimes we want an absolute link, and sometimes we want a relative link.

In line 402 where the function is defined, you see that the third parameter has a default value of TRUE, and it is an optional parameter.  That means if you don't send the third parameter when you call it, you'll get a relative link (not what we want here).  If you call the function with FALSE for the third parameter, you'll get the absolute link we need.

Sermon Browser used to use absolute links everywhere, but that caused problems with the way some people use the plugin.  So in the recent versions, I tried to add in the capability to use relative links in some places.  It looks like I missed the change needed on line 42.  I'll make sure this change gets put into the next version.

Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12

Forum Timezone: Europe/London

Most Users Ever Online: 381

Currently Online:
14 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Rich Brown: 358

Matt Schlueter: 93

Mindy: 72

Don Johnson: 65

anointed: 57

0be1: 55

Member Stats:

Guest Posters: 7

Members: 3188

Moderators: 1

Admins: 1

Forum Stats:

Groups: 1

Forums: 2

Topics: 1713

Posts: 7499

Newest Members:

marktest, deatles50, ValeriaGoodriz, dapedPup, oapedPup, Margarettoimb

Moderators: Ben Miller: 1628

Administrators: Mark Barnes: 435