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
Latest Sermon URL only on Homepage
24 September, 2009
12:40 pm
vagrantmonkey
Member
Forum Posts: 7
Member Since:
23 September, 2009
Offline

In the design I am working on I need a way to call just the URL for the latest sermon on my homepage. I am already using the widget code elsewhere, but here I need just the URL to add as the href in my footer. A URL for the current series would also be great.

Thanks!

24 September, 2009
3:42 pm
Mark Barnes
Admin
Forum Posts: 425
Member Since:
14 December, 2005
Offline

Unfortunately there's no way to do this at the moment. You can use a function to give you the name of the latest sermon, that is linked to the correct page, but you can't get just the URL, sorry.

24 September, 2009
4:14 pm
vagrantmonkey
Member
Forum Posts: 7
Member Since:
23 September, 2009
Offline

Well, let's make that a feature request then. laugh

2 October, 2009
3:06 am
Mark Barnes
Admin
Forum Posts: 425
Member Since:
14 December, 2005
Offline

I've added a URL only function to 0.43.2 (see this FAQ). It will give you the most recent sermon, optionally filtered by series or preacher.

Current series is more problematic as many churches have multiple series running concurrently.

2 October, 2009
5:20 am
vagrantmonkey
Member
Forum Posts: 7
Member Since:
23 September, 2009
Offline

Thanks for adding that in. I may have negated my ability to use it by mucking about with the widget, but I'll give it a shot. I see your point regarding the current series. I'll have to think about that one. Isolating a specific series would still be useful though.

You can check out the site at: http://thechurchonmelrose.org

5 October, 2009
3:48 am
journeyblair
Member
Forum Posts: 3
Member Since:
28 September, 2009
Offline

Hey vagrantmonkey

I went to your site and i really like how you have the search area layed out. Would you be willing to post the code for that? It would be a great help if so. Thanks!

10 October, 2009
1:25 am
walkingcomplete
Orange County CA
Enthusiast
Forum Posts: 16
Member Since:
10 October, 2009
Offline

That is a nice look vagrant monkey. I would love to know how you did it too.

10 October, 2009
2:48 am
vagrantmonkey
Member
Forum Posts: 7
Member Since:
23 September, 2009
Offline

Hi Guys,

Sorry it took so long to get back to you on this. In order to set this up you need to directly edit the "frontend.php" file found inside the sermon browser plugin. Make sure you create a copy of both the original file AND your edited file. That way if you update the plugin you have away to recover these changes.

The code below should replace the "mainFilter" div that starts at line 941 in the original file. All I have really done is rearrange the table and take out some filters I didn't need at this time.

As last note before the code, if you are looking for the graphical look of the code as adjusted by the CSS I can post that separately, but this is the biggest change.

<div id="mainfilter">
<form method="post" id="sermon-filter" action="<?php echo sb_display_url(); ?>">
<div style="clear:both">
<table class="sermonbrowser">
<tr>
<td class="fieldname"><?php _e('Preacher', $sermon_domain) ?></td>
<td class="field"><select name="preacher" id="preacher">
<option value="0" <?php echo (isset($_REQUEST['preacher']) && $_REQUEST['preacher'] != 0) ? '' : 'selected="selected"' ?>><?php _e('[All]', $sermon_domain) ?></option>
<?php foreach ($preachers as $preacher): ?>
<option value="<?php echo $preacher->id ?>" <?php echo isset($_REQUEST['preacher']) && $_REQUEST['preacher'] == $preacher->id ? 'selected="selected"' : '' ?>><?php echo stripslashes($preacher->name).' ('.$preacher->count.')' ?></option>
<?php endforeach ?>
</select>
</td>
</tr>
<tr>
<td class="fieldname"><?php _e('Series', $sermon_domain) ?></td>
<td class="field"><select name="series" id="series">
<option value="0" <?php echo $_REQUEST['series'] != 0 ? '' : 'selected="selected"' ?>><?php _e('[All]', $sermon_domain) ?></option>
<?php foreach ($series as $item): ?>
<option value="<?php echo $item->id ?>" <?php echo $_REQUEST['series'] == $item->id ? 'selected="selected"' : '' ?>><?php echo stripslashes($item->name).' ('.$item->count.')' ?></option>
<?php endforeach ?>
</select>
</td>
</tr>
<tr>
<td class="fieldname"><?php _e('Book', $sermon_domain) ?></td>
<td class="field"><select name="book">
<option value=""><?php _e('[All]', $sermon_domain) ?></option>
<?php foreach ($book_count as $book): ?>
<option value="<?php echo $book->name ?>" <?php echo $_REQUEST['book'] == $book->name ? 'selected=selected' : '' ?>><?php echo stripslashes($book->name). ' ('.$book->count.')' ?></option>
<?php endforeach ?>
</select>
</td>
</tr>
<tr>
<td class="fieldname"><?php _e('Start date', $sermon_domain) ?></td>
<td class="field"><input type="text" name="date" id="date" value="<?php echo mysql_real_escape_string($_REQUEST['date']) ?>" /></td>
</tr>
<tr>
<td class="fieldname"><?php _e('End date', $sermon_domain) ?></td>
<td class="field"><input type="text" name="enddate" id="enddate" value="<?php echo mysql_real_escape_string($_REQUEST['enddate']) ?>" /></td>
</tr>
<tr>
<td class="fieldname"><?php _e('Keywords', $sermon_domain) ?></td>
<td class="field" colspan="1"><input style="width: 98.5%" type="text" id="title" name="title" value="<?php echo mysql_real_escape_string($_REQUEST['title']) ?>" /></td>
</tr>
<tr>
<td class="fieldname"><?php _e('Sort by', $sermon_domain) ?></td>
<td class="field"><select name="sortby" id="sortby">
<?php foreach ($sb as $k => $v): ?>
<option value="<?php echo $v ?>" <?php echo $csb == $v ? 'selected="selected"' : '' ?>><?php _e($k, $sermon_domain) ?></option>
<?php endforeach ?>
</select>
</td>
</tr>
<tr>
<td class="fieldname"><?php _e('Direction', $sermon_domain) ?></td>
<td class="field"><select name="dir" id="dir">
<?php foreach ($di as $k => $v): ?>
<option value="<?php echo $v ?>" <?php echo $cd == $v ? 'selected="selected"' : '' ?>><?php _e($k, $sermon_domain) ?></option>
<?php endforeach ?>
</select>
</td>
</tr>
<tr>
<td colspan="1">&nbsp;</td>
<td class="field"><input type="submit" class="filter" value="<?php _e('Filter &raquo;', $sermon_domain) ?>"> </td>
</tr>
</table>
<input type="hidden" name="page" value="1">
</div>
</form>
</div>
10 October, 2009
2:53 am
vagrantmonkey
Member
Forum Posts: 7
Member Since:
23 September, 2009
Offline

As for some of the CSS, I had to narrow the display of the fields a bit. I changed the CSS code in the Sermon Browser Template (via the admin page). the relevant code is below:

table.sermonbrowser td.fieldname {
font-weight:bold;
font-size: .65em;
padding-right: 10px;
vertical-align:bottom;
}

table.sermonbrowser td.field input, table.sermonbrowser td.field select{
width: 130px;
}

table.sermonbrowser td.field #date, table.sermonbrowser td.field #enddate {
width: 90px;
}

Forum Timezone: Europe/London

Most Users Ever Online: 40

Currently Online:
13 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.