vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Is this possible to do? (https://vborg.vbsupport.ru/showthread.php?t=315226)

XYZ500 11-12-2014 10:10 AM

Quote:

Originally Posted by Lynne (Post 2522305)
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 (Post 2522305)
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 $
|| ####################################################################
\*======================================================================*/


Lynne 11-12-2014 04:01 PM

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.


All times are GMT. The time now is 08:50 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.01161 seconds
  • Memory Usage 1,788KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete