Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 4 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Change Title of Podcast
Dan Druff
Join Date: Mar 2012
Posts: 14

 

Show Printable Version Email this Page Subscription
Dan Druff Dan Druff is offline 12-23-2012, 11:00 PM

vBulletin has a great built-in podcast system, but it is unfortunately LACKING one very basic feature: You can't name your podcasts!

When vBulletin generates an RSS Feed for iTunes and other podcasting services, it automatically assigns a name to your podcast. That name is always a concatenation of the name of your forums and the individual forum name where they appear. For example, if your forums were called "Baseball Discussion Forums" and the podcast forum was called "Our Podcasts", all of your podcasts would be listed as "Baseball Discussion Forums - Our Podcasts" on iTunes, which is cumbersome-looking and unprofessional. If you wanted the Podcast to simply be called "The National League Report", you couldn't do it.

This modification allows you to name your podcasts whatever you want. It requires one simple database change and two small modifications to source code.

Database Change

1)Locate the podcast database entry.

2) Add a column to the end of the entry called "podcastname" (without the quotes). Make it identical to the "author" entry, in terms of format. This is, make it of type VARCHAR length 255, with latin1_swedish_ci collation.

This database change is mandatory! This modification will crash without it. However, it is backwards compatible with your other podcasts, so the database change itself will not harm anything, even if you back out this modification at some point.



Source Changes

You will be modifying two source files. One is external.php in your main forum directory. One is forum.php in the admincp subdirectory of your forum.

Changes for external.php are as follows:

Locate this block:
Code:
             if (empty($title))
             { // just show board title 
                     $rsstitle = $vbulletin->options['bbtitle'];
             }
             else
             { // show board title plus selection
                     $rsstitle = $vbulletin->options['bbtitle'] . " - $title";
             }
Add the following code BEFORE the block:
Code:
        if ($podcastinfo['podcastname'])
        {
                $rsstitle = $podcastinfo['podcastname'];
        }
        else
        {
Add the following right AFTER the block:
Code:
        }

Here are the changes to make for forum.php in the admincp directory:

Locate the following code:
Code:
        print_podcast_chooser($vbphrase['category'], 'categoryid', $podcast['categoryid']);
Add the following code right AFTER:
Code:
        print_input_row('Podcast Name' . '<dfn>' . construct_phrase($vbphrase['maximum_chars_x'], 255) . '</dfn>', 'podcastname', $podcast['podcastname']);

Next, locate the following code:
Code:
        $vbulletin->input->clean_array_gpc('p', array(
                'categoryid' => TYPE_UINT,
                'explicit'   => TYPE_BOOL,
                'enabled'    => TYPE_BOOL,
Add the following line right AFTER:
Code:
                'podcastname' => TYPE_STR,

Next, locate the following code:
Code:
        $db->query_write("
                REPLACE INTO " . TABLE_PREFIX . "podcast (forumid, enabled, categoryid, category, author, image, explicit, keywords, owneremail, ownername, subtitle, summary)
                VALUES (
                        $forum[forumid],
                        " . intval($vbulletin->GPC['enabled']) . ",
                        " . $vbulletin->GPC['categoryid'] . ",
                        '" . $db->escape_string(serialize($category)) . "',
REPLACE that code with:
Code:
        $db->query_write("
                REPLACE INTO " . TABLE_PREFIX . "podcast (forumid, enabled, categoryid, category, podcastname, author, image, explicit, keywords, owneremail, ownername, subtitle, summary)
                VALUES (
                        $forum[forumid],
                        " . intval($vbulletin->GPC['enabled']) . ",
                        " . $vbulletin->GPC['categoryid'] . ",
                        '" . $db->escape_string(serialize($category)) . "',
                        '" . $db->escape_string($vbulletin->GPC['podcastname']) . "',
That's it!

Now you will have a new field to enter your podcast name in the Podcast Settings admin screen. The new field is circled in the attachment below:



Make sure you go to your existing podcasts and add a name to them!
Reply With Quote
  #2  
Old 12-25-2012, 09:14 AM
o.dinc o.dinc is offline
 
Join Date: Dec 2011
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good Job , Thanks...
Reply With Quote
  #3  
Old 01-25-2015, 07:34 PM
brandondrury brandondrury is offline
 
Join Date: Oct 2005
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since this requires changes to hard coded files, I'm going to skip the database change and simply enter my Podcast name in external.php. Let's see if it works.

Thanks for the help!

Brandon
Reply With Quote
  #4  
Old 03-21-2020, 09:22 PM
Dan Druff Dan Druff is offline
 
Join Date: Mar 2012
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi everyone. Over 7 years later, but here's another small modification to make. The vBulletin Podcast RSS generator screws up lastBuildDate by always setting it to the current date (which changes every time someone accesses it), and not the last time it actually changed.

You can fix this by searching for "lastBuildDate" (without the quotes) in external.php, commenting out or deleting that line, and then putting this line right after it:

$xml->add_tag('lastBuildDate', gmdate('D, d M Y H:i:s', $threadcache[0]['dateline']) . ' GMT');
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:14 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03716 seconds
  • Memory Usage 2,234KB
  • Queries Executed 19 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (9)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete