Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-06-2009, 12:40 PM
combs combs is offline
 
Join Date: Aug 2007
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Change Links of a Directory Problem

So I installed this Mod: https://vborg.vbsupport.ru/showthread.php?t=204120 It's the Bloglike Homepage.

I Love it. Except it is my homepage at bbwforums.net and my forum is at bbwforums.net/forum . So when you go to the links, they are all linking to pages without the /forum which is annoying because that's not where the forum should be.

I just wanna change it to change all the links on the right, and in the login, and in the nav to go to /forum instead.

here is the Index page code.

Code:
<?php

//###############################################

//////////////////////////// Blog-Like homepage  ////////////////////////

//////-----------------------------                by ProvB                --------------------\\\\\\\\\\

/////------------------------ ------  http://www.provb.org    ---------------------\\\\\\\\\\\\

///////////////////////////////////////////////////////////////////////

//###############################################



// ####################### SET PHP ENVIRONMENT ###########################

error_reporting(E_ALL & ~E_NOTICE);



// #################### DEFINE IMPORTANT CONSTANTS #######################

define('THIS_SCRIPT', 'provb_blhome');

define('CSRF_PROTECTION', true);

define('CSRF_SKIP_LIST', '');



// ################### PRE-CACHE TEMPLATES AND DATA ######################

// get special phrase groups

$phrasegroups = array('provb_blhome');



// get special data templates from the datastore

$specialtemplates = array(

);



// pre-cache templates used by all actions

$globaltemplates = array(

	'provb_blhome',

	'provb_blhome_attachbit', 

	'provb_blhome_featured_post', 

	'provb_blhome_latest_memberbit', 

	'provb_blhome_latest_threadbit', 

	'provb_blhome_navforum', 

	'provb_blhome_navforumbit_level1_nopost', 

	'provb_blhome_navforumbit_level1_post', 

	'provb_blhome_navforumbit_level2_post', 

	'provb_blhome_navforumbit_level2_nopost', 

	'provb_blhome_navforumbit_level3_post',

	'forumhome_subforumbit_post',

	'forumhome_subforumbit_nopost',

	'forumhome_subforumseparator_post',

	'forumhome_subforumseparator_nopost',

);



// pre-cache templates used by specific actions

$actiontemplates = array();



// ######################### REQUIRE BACK-END ############################

require_once('./global.php');



// Random Stuff

require_once(DIR . '/includes/class_bbcode.php');

$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());

$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list()); 



// #######################################################################

// ######################## START MAIN SCRIPT ############################

// #######################################################################

// ######################### REQUIRE BACK-END ############################

if (empty($_REQUEST['do']))

{

	$_REQUEST['do'] = 'main';

}



	$blhome_file = explode('/', $_SERVER['SCRIPT_NAME']);

	$blhome_file = str_replace('.php', '', $blhome_file[1]);

// #######################################################################

// ######################## START MAIN SCRIPT ############################

// #######################################################################



if ($_REQUEST['do'] == 'main'){



if($vbulletin->options['provb_blhome_forumside_mode']){

	$vbulletin->input->clean_array_gpc('r', array(

		'f' => TYPE_UINT

	));

	$forumid = $vbulletin->GPC['f'];

} else {

	$forumid = 0;

}



	// Excluded forums?

	$provb_blhome_excluded_forums = $vbulletin->options['provb_blhome_excluded_forums'];

	if(!$provb_blhome_excluded_forums){ $provb_blhome_excluded_forums = 0; }

	$provb_blhome_excluded_forums = explode(",", $provb_blhome_excluded_forums);

	

	// Get Latest Threads

	$provb_blhome_latest_threads_get = $vbulletin->db->query_read("SELECT post.postid, thread.firstpostid, thread.threadid, thread.title, thread.views, thread.replycount, thread.postusername, thread.postuserid, thread.dateline 

															FROM " . TABLE_PREFIX . "thread AS thread 

															LEFT JOIN " . TABLE_PREFIX . "post AS post ON(post.postid = thread.firstpostid) 

															WHERE thread.forumid NOT IN ('" . implode("','",$provb_blhome_excluded_forums) . "') AND thread.visible = '1'

															ORDER BY thread.dateline DESC 

															LIMIT " . $vbulletin->options['provb_blhome_recthreads'] . "

														");



	// Process Latest Threads

	while($thread = $vbulletin->db->fetch_array($provb_blhome_latest_threads_get)){

	    		

	    eval('$provb_blhome_latest_threads .=  "'.fetch_template('provb_blhome_latest_threadbit').' ";');



	}



// Fitler criteria

if(!$forumid){

	

	$provb_blhome_featuredposts_apostrophies = "'" . str_replace(',', '\',\'', $vbulletin->options['provb_blhome_featuredposts']) . "'";

	

	$featured_post_criteria = "post.postid IN (" . $vbulletin->options['provb_blhome_featuredposts'] . ") ORDER BY FIELD(post.postid," . $provb_blhome_featuredposts_apostrophies . ")";



} else {



	if(!$vbulletin->options['provb_blhome_featuredpost_mode']){

	$certainposts = "AND post.postid = thread.firstpostid";

	}



	$featured_post_criteria = "thread.forumid = '$forumid' AND thread.forumid NOT IN ('" . implode("','",$provb_blhome_excluded_forums) . "') AND thread.visible = '1' $certainposts

	ORDER BY post.dateline DESC

	LIMIT " . $vbulletin->options['provb_blhome_forumside_max'] . "";



}



if($vbulletin->options['provb_blhome_featuredposts']){



	// Get Featured Post

	$provb_blhome_featured_post_get = $vbulletin->db->query_read("SELECT forum.description_clean AS forumdesc_clean, forum.title AS forum_title, forum.forumid, post.userid, post.threadid, post.postid, user.avatarrevision, post.title, post.pagetext, post.dateline, user.username, user.joindate " . iif($vbulletin->options['avatarenabled'], ',avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width_thumb AS avwidth,customavatar.height_thumb AS avheight') . " 

																	FROM " . TABLE_PREFIX . "post AS post

																	LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = post.userid)

																	LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON(thread.threadid = post.threadid)

																	LEFT JOIN " . TABLE_PREFIX . "forum AS forum ON(forum.forumid = thread.forumid)

																	" . iif($vbulletin->options['avatarenabled'], "LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON(avatar.avatarid = user.avatarid)

																	LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON(customavatar.userid = user.userid)") . "

																	WHERE " . $featured_post_criteria . "

																");



	// Process Featured  Post

	while($post = $vbulletin->db->fetch_array($provb_blhome_featured_post_get)){

	

		$post[date] = vbdate($vbulletin->options['dateformat'], $post[dateline]);

		    

		$post['avatarurl'] = $vbulletin->options['bburl'] . '/';

		// get avatar

		if ($post['avatarid'])

		{

			$post['avatarurl'] = $post['avatarpath'];

		}

		else

		{

			if ($post['hascustomavatar'] AND $vbulletin->options['avatarenabled'])

			{

				if ($vbulletin->options['usefileavatar'])

				{

					$post['avatarurl'] .= $vbulletin->options['avatarurl'] . '/avatar' . $post['userid'] . '_' . $post['avatarrevision'] . '.gif';

				}

				else

				{

					$post['avatarurl'] .= 'image.php?' . $vbulletin->session->vars['sessionurl'] . 'u=' . $post['userid'] . '&amp;dateline=' . $post['avatardateline'];

				}

				if ($post['avwidth'] AND $post['avheight'])

				{

					$post['avwidth'] = 'width="' . $post['avwidth'] . '"';

					$post['avheight'] = 'height="' . $post['avheight'] . '"';

				}

				else

				{

					$post['avwidth'] = '';

					$post['avheight'] = '';

				}

			}

			else

			{

				$post['avatarurl'] .= 'images/misc/provb_blhome_noav.gif';

			}

		}



		$post[message] = $parser->do_parse($post[pagetext], $do_html, $do_smilies, 1, 1, 1, $cachable); 

		

		exec_switch_bg();

		

		$forum_title = $post[forum_title];

		

		$totalfeatured++;

		

	    eval('$provb_blhome_featured_post .=  "'.fetch_template('provb_blhome_featured_post').' ";');



	}

	

}



// Get Forums List

require_once(DIR . '/forum/includes/functions_forumlist.php');

if (empty($vbulletin->forumcache)){

       cache_ordered_forums(0, 1);

} 

foreach($vbulletin->forumcache AS $provb_blhome_navforum){



			// Set $forum

			$forum = $provb_blhome_navforum;

			$provb_blhome_navforumid = $forum[forumid];

			

			$forumdepth = $forum['depth'] + 1;

			

			if($forumdepth < 3){

	            $provb_blhome_navforum_perms = $vbulletin->userinfo['forumpermissions']["$provb_blhome_navforumid"];

	             if (!($provb_blhome_navforum_perms & $vbulletin->bf_ugp_forumpermissions['canview']) AND ($vbulletin->forumcache["$provb_blhome_navforumid"]['showprivate'] == 1 OR (!$vbulletin->forumcache["$provb_blhome_navforumid"]['showprivate'] AND !$vbulletin->options['showprivateforums'])))

	            { // no permission to view current forum

					$provb_blhome_excluded_forums[] = "$provb_blhome_navforumid";

	                continue;

	            }

	            if(!($provb_blhome_navforum_perms & $vbulletin->bf_ugp_forumpermissions['canviewthreads'])){

					$provb_blhome_excluded_forums[] = "$provb_blhome_navforumid";

				}

				

	            if (!$forum['displayorder'] OR !($forum['options'] & $vbulletin->bf_misc_forumoptions['active']) OR in_array($forum['forumid'], $provb_blhome_excluded_forums))

	            {

	                // forum not active

					$provb_blhome_excluded_forums[] = "$provb_blhome_navforumid";

	                continue;

	            } 

				

			if (($forum['options'] & $vbulletin->bf_misc_forumoptions['cancontainthreads']))

				{ // get appropriate suffix for template name

					$cancontainthreads = 1;

					$tempext = '_post';

				}

				else



				{

					$tempext = '_nopost';

				}

				

			$show['forumdescription'] = ($forum['description'] != '' ? true : false);

			

			if($forum['depth']){

			

				$forum_subforums = construct_subforum_bit($provb_blhome_navforumid, ($forum['options'] & $vbulletin->bf_misc_forumoptions['cancontainthreads'] ) );

				

			}

			

			if(!empty($forum_subforums)){ $show['this_subforums'] = 1; } else { $show['this_subforums'] = 0; }

			

			global $provb_blhome_navforumbit;

			eval('$provb_blhome_navforumbit .= "' . fetch_template("provb_blhome_navforumbit_level$forumdepth$tempext") . '";'); 

		}

}

		



	eval('$navbar = "' . fetch_template('navbar') . '";');

	eval('print_output("' . fetch_template("provb_blhome") . '");');



}





/*======================================================================*\

|| ####################################################################

|| # Downloaded: 11:07, Thu Sep 4th 2008

|| # CVS: $RCSfile$ - $Revision: 26941 $

|| ####################################################################

\*======================================================================*/

?>
Do you see anything I can do? The ony thing I can think of would be to move the entire forum back to the main directory, but I don't wanna do this as i've already switched it like 5 times.
Reply With Quote
 


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 01:36 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03540 seconds
  • Memory Usage 2,436KB
  • Queries Executed 13 (?)
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
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)showthread_list
  • (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_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • 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_threaded
  • showthread_threaded_construct_link
  • 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