vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=327705

.htaccess file
by eboggs_jkvl
13 Dec 2019 16:22

Is there a specific location in Vb4 for this file?

I think I need to add a line to it to make the "Calendar" click go to a google calendar but I need to find the darn .htaccess file.

Where the heck is it?

I plan on adding this code:

Redirect 301 /calendar.php http://www.google.com/[your calendar url]

Elmer

Dave 13 Dec 2019 16:38

The .htaccess file is not required for vBulletin 4. Generally, it should be located at the root. That is, in the same folder as the login.php, register.php and global.php files.

eboggs_jkvl 13 Dec 2019 18:40

Ahso....


So I create the file in the root and put that line of code in it and anyone that clicks on Calendar (calendar.php) will be rerouted to the public Gmail account we are trying to establish for our Car Club Forum?

Elmer

--------------- Added 14 Dec 2019 at 04:38 ---------------

I found out the way to redirect the "Calendar" link to go to a Google Calendar. This allows all of my forum members to access a syncronized calendar that shows all of the activities of my car club forum.

It is accomplished by editing the calendar.php file and redirect the file function to go to the URL of my public google calendar.

The following editing is used to go to my public google calendar:

<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 4.2.5 - Licence Number VBF1234567
|| # ---------------------------------------------------------------- # ||
|| # Copyright 2000-2017 vBulletin Solutions Inc. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # www.vbulletin.com | www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// ##################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'calendar');
define('CSRF_PROTECTION', true);
define('GET_EDIT_TEMPLATES', 'edit,add,manage');

// COMMENT The lines below do the redirect to my public google calendar https url
$redirect_url='https://calendar.google.com/calendar/embed?src=.........america%2FNew_York';
echo '<meta http-equiv="Refresh" content="0; url=' . $redirect_url . '" />';
exit;


All of the rest of the code for the calendar.php is unedited and not read by the calendar.php action. It can be left in the file but it is ignored. I abbreviated my URL code to save space. You would need to put your complete URL code in your edit. To go back to the original file function, you can comment out the added code with "//" or simply remove the added code.



I hope this can help someone that wants to use a synchronized calendar on their VB4 rather than the "stock" vBulletin calendar.


Elmer


All times are GMT. The time now is 13:40.

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.