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

Reply
 
Thread Tools Display Modes
  #31  
Old 11-12-2014, 10:10 AM
XYZ500 XYZ500 is offline
 
Join Date: Aug 2014
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
If you want to add your own tags and make them 'stay' there, you would need to edit the template and add them manually.

To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. (Sometimes the template is the one mentioned at the very top of the page source.)
I did this part: "To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes ."

I couldn't understand how to do the rest. So I went to adminCP > vBa CMPS > Edit modules > Popular Tags. And I took screenshot of everything on that page. Please let me know what to edit to make the tags permanent on the homepage.

http://prntscr.com/55lhlh
http://prntscr.com/55lhsr

--------------- Added [DATE]1415799014[/DATE] at [TIME]1415799014[/TIME] ---------------

Quote:
Originally Posted by Lynne View Post
If you want to add your own tags and make them 'stay' there, you would need to edit the template and add them manually.

To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. (Sometimes the template is the one mentioned at the very top of the page source.)
I guess this is the tags template that needs to be edited to add my own tags that stay there.

This is tags.php file.

Where to enter my own tags here?

PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 4.2.2 Patch Level 1 - Licence Number VBFDAD2BA0
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2000-2014 vBulletin Solutions Inc. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT''tags');
define('CSRF_PROTECTION'true);
define('ALTSEARCH'true);


// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array('inlinemod''search''prefix');

// get special data templates from the datastore
$specialtemplates = array(
    
'tagcloud',
    
'iconcache'
);

// pre-cache templates used by all actions
$globaltemplates = array(
    
'humanverify',
    
'optgroup',
    
'search_common',
    
'search_results',
    
'search_results_postbit'// result from search posts
    
'search_results_postbit_lastvisit',
    
'threadbit'// result from search threads
    
'threadbit_deleted'// result from deleted search threads
    
'threadbit_announcement',
    
'newreply_reviewbit_ignore',
    
'threadadmin_imod_menu_thread',
    
'threadadmin_imod_menu_post',
    
'tag_cloud_link'
);

// pre-cache templates used by specific actions
$actiontemplates = array(
    
'cloud' => array(
        
'tag_cloud_box',
        
'tag_cloud_link',
        
'tag_cloud_page'
    
),
    
'tag' => array(
        
'tag_search',
        
'threadadmin_imod_menu_thread',
        
'threadbit',
        
'search_resultlist',
        
'search_threadbit'
    
)
);

if (empty(
$_REQUEST['do']))
{
    if (empty(
$_REQUEST['tag']))
    {
        
$_REQUEST['do'] = 'cloud';
    }
    else
    {
        
$_REQUEST['do'] = 'tag';
    }
}

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
require_once(
DIR '/includes/functions.php');
require_once(
DIR '/includes/functions_bigthree.php');
require_once(
DIR '/includes/functions_forumdisplay.php');
require_once(
DIR '/includes/functions_search.php');
require_once(
DIR '/includes/functions_forumlist.php');
require_once(
DIR '/includes/functions_misc.php');
//new search stuff.
require_once(DIR '/vb/search/core.php');
require_once(
DIR '/vb/legacy/currentuser.php');
require_once(
DIR '/vb/search/resultsview.php');


if (!
$vbulletin->options['threadtagging'])
{
    
print_no_permission();
}

(
$hook vBulletinHook::fetch_hook('tags_start')) ? eval($hook) : false;

// #######################################################################
if ($_REQUEST['do'] == 'cloud')
{
    require_once(
DIR '/includes/functions_search.php');

    
$tag_cloud fetch_tagcloud('usage');

    
$navbits construct_navbits(array(
        
'' => $vbphrase['tags'],
    ));
    
$navbar render_navbar_template($navbits);

    (
$hook vBulletinHook::fetch_hook('tags_cloud_complete')) ? eval($hook) : false;

    
$templater vB_Template::create('tag_cloud_page');
        
$templater->register_page_templates();
        
$templater->register('navbar'$navbar);
        
$templater->register('tag_cloud'$tag_cloud);
    
print_output($templater->render());
}

// #######################################################################
if ($_REQUEST['do'] == 'tag')
{

    
$vbulletin->input->clean_array_gpc('r', array(
        
'tag' => TYPE_NOHTML,
        
'pagenumber' => TYPE_UINT,
        
'perpage' => TYPE_UINT
    
));

    if (!
$vbulletin->GPC['tag'])
    {
        
standard_error(fetch_error('invalidid'$vbphrase['tag'], $vbulletin->options['contactuslink']));
    }

    
$search_core vB_Search_Core::get_instance();
    
$current_user = new vB_Legacy_CurrentUser();

    
$criteria $search_core->create_criteria(vB_Search_Core::SEARCH_TAG);
    
$criteria->add_tag_filter($vbulletin->GPC['tag']);

    
$errors $criteria->get_errors();
    if (
$errors)
    {
        
standard_error(fetch_error($errors[0]));
    }
    
$results null;
    
$searchstart microtime();
    if (!(
$vbulletin->GPC_exists['nocache'] AND $vbulletin->GPC['nocache']))
    {
        
$results vB_Search_Results::create_from_cache($current_user$criteria);
    }

     if (!
$results)
    {
        
$results vB_Search_Results::create_from_criteria($current_user$criteria
            
$search_core->get_tag_search_controller());
    }

    
$base =  'tags.php?' $vbulletin->session->vars['sessionurl'] .
        
'tag=' $vbulletin->GPC['tag'] . '&amp;pp=' $perpage;

    
$navbits = array('search.php' $vbulletin->session->vars['sessionurl_q'] => $vbphrase['search_forums']);
    
$view = new vb_Search_Resultsview($results);
    
$view->showpage($vbulletin->GPC['pagenumber'], $vbulletin->GPC['perpage'], $base$navbits);
    exit;
}

/*======================================================================*\
|| ####################################################################
|| # Downloaded: 11:00, Thu Aug 14th 2014
|| # CVS: $RCSfile$ - $Revision: 54782 $
|| ####################################################################
\*======================================================================*/
Reply With Quote
  #32  
Old 11-12-2014, 04:01 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That templates are found in Style Manager > find your style > Edit Templates. I don't know they name of the group to expand if this is a vBAdvanced template.
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 10:26 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.04675 seconds
  • Memory Usage 2,235KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete