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
Display Attached File Name or Allow Description?
12 July, 2011
8:33 pm
smikwily
New Member
Forum Posts: 1
Member Since:
12 July, 2011
Offline

Our pastor would like to include a PDF of the Sunday Bulletin with each sermon, but he noticed that if he attaches a file, you have no way of knowing what the file is until you download it. The Word/PDF image links help, but there is no way to let you know which file is his sermon notes and which file is the bulletin. I thought adding it directly to the sermon would be the easiest route, but we are trying to avoid some confusion for our users.

Thanks!

12 July, 2011
10:10 pm
Rich Brown
Parkville, MD
Guru
Forum Posts: 306
Member Since:
13 July, 2009
Offline

That question has been asked before, and so far nobody has been able to answer. What I did is simply placed instructions in the "description" field. See THIS SERMON:

Rich Brown
Aisquith Presbyterian Church
Parkville, Maryland, USA
sermons.aisquith.org
9 December, 2011
12:59 am
abmoody
San Antonio, Texas
Member
Forum Posts: 8
Member Since:
28 October, 2011
Offline

Hey Rich,

I notice you got it to display "Worship Bulletin".  It looks like you created a new image with the text attached.  How did you go about causing that to display instead of the default image?

 

Blessings,

Andrew

9 December, 2011
1:57 am
Rich Brown
Parkville, MD
Guru
Forum Posts: 306
Member Since:
13 July, 2009
Offline

abmoody said

Hey Rich,

I notice you got it to display "Worship Bulletin".  It looks like you created a new image with the text attached.  How did you go about causing that to display instead of the default image?

 

Blessings,

Andrew

Edit and replace this file:

 

"/wordpress/wp-content/plugins/sermon-browser/sb-includes/icons/pdf.png". 

 

When you upload the new one, just give it the same file name.  Remember to backup the old one just in case you ever need it again.  Keep in mind to that by doing this, PDFs in Sermon Browser will all get the same label.  Since we only use PDFs in SB for worship bulletins, that's ok, but if you upload sermon text as well as bulletins, that may create a problem.  Then use WordPress to edit filetypes.php and look for this block of code:

'pdf' => array(
        'name' => 'Adobe Acrobat',
        'icon' => 'pdf.png',
        'content-type' => 'application/pdf',

And change "Adobe Acrobat" to whatever you what to display when you mouse over the icon. 

Rich Brown
Aisquith Presbyterian Church
Parkville, Maryland, USA
sermons.aisquith.org
9 December, 2011
5:13 am
abmoody
San Antonio, Texas
Member
Forum Posts: 8
Member Since:
28 October, 2011
Offline

thanks, I'll give it a try.  None of the churches I've worked with to this point have posted documents every week, however, the church I'm currently building a site for posts their bulletins every week, so I'm working on helping them to format them and post them with SB.  The new site is http://www.faithpca.com

 

Blessings,

Andrew

14 December, 2011
12:12 pm
al_duncan
Member
Forum Posts: 6
Member Since:
14 December, 2011
Offline

Hey,

 

I did this slightly differently. Including the name in the image wouldn't work for me as we sometimes attach multiple additional downloads and needed each to be labelled correctly so here is what I've come up with.

 

We name all our files using the following standard: yyyymmdd_file_name.pdf

 

In the frontend.php file find the sb_print_url function. In it I added the line:

 

$attach_name = ucwords(str_replace('_',' ',substr(substr($pathinfo['basename'],9),0,-4)));

 

Which turns 'yyyymmdd_file_name.pdf' into 'File Name'. You'll need to change this line to suit your own naming conventions.

 

Then I just change the line that prints the file link to include $attach_name. So my echo now looks like:

 

echo "<div class=\"additional_item\"><a href=\"{$url}\"><img class=\"site-icon\" alt=\"{$filetypes[$ext]['name']}\" title=\"{$filetypes[$ext]['name']}\" src=\"{$uicon}\"><br />$attach_name</a></div>";

 

You can see an example of the output here.

 

I should also mention I've made some more alterations so I have a seperate file loop of audio and non audio attachments. That just gives me more freedom to how I lay out the page.

 

Hope this helps,

Al

24 December, 2011
4:08 pm
cvcaller
chula vista, ca 91911
Member
Forum Posts: 6
Member Since:
5 July, 2011
Offline

This may be what I was looking for (and many others too!)  I noticed you also have your sermons sorted by series.  Maybe I'm a knuckle-head but how did you get it to do that?

Thanks!

 

al_duncan said

Hey,

 

I did this slightly differently. Including the name in the image wouldn't work for me as we sometimes attach multiple additional downloads and needed each to be labelled correctly so here is what I've come up with.

 

We name all our files using the following standard: yyyymmdd_file_name.pdf

 

In the frontend.php file find the sb_print_url function. In it I added the line:

 

$attach_name = ucwords(str_replace('_',' ',substr(substr($pathinfo['basename'],9),0,-4)));

 

Which turns 'yyyymmdd_file_name.pdf' into 'File Name'. You'll need to change this line to suit your own naming conventions.

 

Then I just change the line that prints the file link to include $attach_name. So my echo now looks like:

 

echo "<div class=\"additional_item\"><a href=\"{$url}\"><img class=\"site-icon\" alt=\"{$filetypes[$ext]['name']}\" title=\"{$filetypes[$ext]['name']}\" src=\"{$uicon}\"><br />$attach_name</a></div>";

 

You can see an example of the output here.

 

I should also mention I've made some more alterations so I have a seperate file loop of audio and non audio attachments. That just gives me more freedom to how I lay out the page.

 

Hope this helps,

Al

9 January, 2012
10:17 am
al_duncan
Member
Forum Posts: 6
Member Since:
14 December, 2011
Offline

Hey cvcaller,

Glad you found the info helpful and let me know if you have any problems getting it working and I'll see if I can help.

 

To get the sermons by series widget I did the following. Before you follow this please know that I did this as a quick hack in a hurry so there are probably some things in it that can be done cleaner. I plan to go back and tidy up when I get the chance but haven't yet. I'll use paste bin to put the code up since it looks like you can no longer embed the code in a forum post.

 

First I created a function in the frontend.php file that displays the sermons by series in a widget. I added the function just below the main sermon browser widget but you can put it anywhere you want.

View the function here: http://pastebin.com/7yMzWRAh

 

Then edit the sermon.php file. Find the function called 'sb_widget_sermon_init' and add the following line:

//Sermon Series Widget
wp_register_sidebar_widget('sermon-browser-sermon-series', __('List of Sermon Series', $sermon_domain), 'sb_widget_sermon_series_wrapper');

 

Then find the function 'sb_widget_sermon_wrapper' and create a new function just after it. The function should look like this: http://pastebin.com/qjsS2GN4

 

Once you've done that there should be a 'Sermons by Series' widget available in the widgets section of layout administration in the wordpress backend. You can then just drag it into place like you would for any other wordpress widget. You can see the results here: http://www.harvestglasgow.org/…..n-browser/ 

 

Hope that is useful to you and let me know if you need any help getting it to work. Like I say though this was a quick hack so if you spot any glaring errors feel free to edit them before you copy it to your site.

Cheers,

Al

Forum Timezone: Europe/London

Most Users Ever Online: 40

Currently Online:
12 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:

Guest Posters: 7

Members: 2062

Moderators: 1

Admins: 1

Forum Stats:

Groups: 1

Forums: 2

Topics: 1071

Posts: 4042

Newest Members: richdorm, Aaron Velasquez, aaronv, dave5884, tomduckering, ccwebb

Moderators: Ben Miller (386)

Administrators: Mark Barnes (425)

Comments are closed.