session_begin(); $auth->acl($user->data); $user->setup('mods/instadisc', $forum_data['forum_style']); $template->set_filenames(array( 'body' => 'instadisc.html') ); $template->assign_vars(array( 'S_SUBSCRIPTION' => ('http://' . $_SERVER['SERVER_NAME'] . '/forum-post/' . generateSlug($config['id_subscription_title']) . '/'), 'S_TITLE' => $config['id_subscription_title'], 'S_KEY' => $config['id_activation_key'], )); page_footer(); function generateSlug($title) { $title = preg_replace('/[^A-Za-z0-9]/','-',$title); $title = preg_replace('/-{2,}/','-',$title); if (substr($title,0,1) == '-') { $title = substr($title,1); } if (substr($title,strlen($title)-1,1) == '-') { $title = substr($title,0,strlen($title)-1); } $title = strtolower($title); return($title); } ?>