Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - a4evermedia

Pages: 1 2 3
TubeX / 4-Column List of Categories
« on: May 23, 2012, 06:14:47 PM »
4-Column List of Categories

{categories var=$categories amount=all order=name}
{assign var=$per_column value=ceil(count($categories)/4)}

{foreach var=$category from=$categories counter=$counter}

{if $counter % $per_column == 0}


TgpX(SE) / Make Hidden Category "Really" Hidden
« on: May 18, 2012, 04:38:12 PM »
Although the hidden categories do not show up in the url's category list, all hidden categories still show up in the drop-down list for the search function. How do I filter out the hidden cats in this drop-down list?

Answer:You can change the template code for the category <select> field to this:

Code: [Select]
<select name=&quot;c&quot;>
  <option value=&quot;&quot;>All Categories</option>
  {foreach var=$sc from=$search_categories}
  {if $sc.hidden == 0}
  <option value=&quot;{$sc.tag|htmlspecialchars}&quot;>{$|htmlspecialchars}</option>

Thanks Jeremy

TradeX Discussion / Use TradeX to Skim on TubeX Video thumbs?
« on: May 14, 2012, 01:30:37 AM »
Yes, that can be done and is just a matter of adding the out.php code to your TubeX templates. For example, on the index.tpl template the default link code looks like this:

Code: [Select]
 <a href="{$g_config.base_uri}/video/{$video.video_id}/{$video.title|t_urlify(7)}"> 

Updating it to use TradeX with a 70% skim would look like this (assuming TradeX installed in the tx directory of your site):

Code: [Select]
 <a href="/tx/out.php?s=70&u={$g_config.base_url}/video/{$video.video_id}/{$video.title|t_urlify(7)}"> 

TubeX / Search and Replace Tags
« on: May 10, 2012, 09:09:43 AM »
You might need to edit your video tags to be consistent.

This can be easily done with this Raw SQL query.

UPDATE `tbx_video` SET `tags`= REPLACE(`tags`,'cumshot ','cumshots ')

This Raw SQL Query searches the field 'tags' and replaces the word 'cumshot' with the word 'cumshots'

Note: You can also replace the search field "tags" with "title" or "description" and do replacements in those fields.

The general format of this command is:
UPDATE table SET field = REPLACE(field, 'oldstring', 'newstring')

You will get a notification of how many lines were changed after using this command.

More info:

TgpX(SE) / Expanding search.php
« on: May 06, 2012, 06:26:15 PM »
By default, search.php references only keywords and descriptions. 

To expand the search parameters to include tags, and titles make the following edits.

In your search.php script, locate line 64

Code: [Select]
$search_wheres = array('MATCH(`description`,`keywords`) AGAINST(? IN BOOLEAN MODE)', '`status` IN (?,?)');

Add 'tags' and `title` to the MATCH function;

Code: [Select]
$search_wheres = array('MATCH(`description`,`keywords`,`tags`,`title`) AGAINST(? IN BOOLEAN MODE)', '`status` IN (?,?)');

Now when search.php is accessed, it will search the tags, titles, keywords and descriptions.

TubeX Discussion / Listing Categories In 6 Equal Columns
« on: April 30, 2012, 05:20:17 AM »
I am looking for an efficient way to list categories in 6 columns.  Any suggestions would be greatly appreciated.

TubeX / Capitalized, Comma-seperated VIDEO Tag List
« on: April 30, 2012, 04:35:57 AM »
In the default video-watch.tpl, tags are presented in lower case, single word, space-seperated terms.  For those the want to use capatalized, comma-seperated, multi-word terms, I believe the following code snippet will work for you.

This code supports multi-word tags which must be seperated by an underscore character '_' in the script.  Meaning that when you add the tag in the administration module you must seperate the words with an underscore character like this, 'group_sex'.  These '_' characters are removed for display and each seperated word is then capitalized. Each (multi-word) tag is then seperated by a comma for display. 

Code: [Select]
{assign var=$tags code=explode(' ', $video.tags)}
{assign var=$numtags code=count($tags)}
{foreach var=$tag from=$tags counter=$i}
{assign var=$tag_text code=ucwords(str_replace(array('_'), ' ', $tag))}
<a href="{$g_config.base_uri}/tag/{$tag}/">{$tag_text}</a>{if $i < $numtags}, {/if}

Thanks CrazyAl

Please post comments and questions about customizing this code in TubeX General Discussion.

TgpX(SE) / Lost Your Password?
« on: April 29, 2012, 04:16:04 PM »
TubeX: For security purposes, the control panel passwords cannot be retrieved. You can, however, use the reset-access.php utility script included with the software to generate a new superuser account. Upload this file to the admin directory of your TubeX installation and bring it up in your browser. Be sure to remove this file after you have the new account created.

TGPX: Same as above

TradeX: See TubeX

TubeX / Customizing Your TubeX Categories Page
« on: April 29, 2012, 01:52:28 PM »
The following code will allow you to effortlessly customize your TubeX categories.tpl page.  This code does two things for you;

1. Randomizes the display of category names for the purpose of adding some variety.

2. Grabs random images for display in each category that has at least one video.  If you have no videos in a category, the default 'no-preview' thumb will appear.  So you won't need to spend time searching for representative category images to upload.


Code: [Select]
{foreach var=$category from=$categories counter=$counter}
    {videos var=$videos amount=1 category=$category.category_id sort=RAND()}
    {assign var=$video code=$videos[0]}
    <span class="video">
       <div class="video-container">
       <a target="_blank"  href="{$category.url_name}/">
          <img src=&quot;{if $video.thumbnail}{$video.thumbnail}{else}{$g_config.no_preview}{/if}" class="video-thumb" title="{$}" />
         <div class="text-center">
           <a target="_blank" href="{$category.url_name}/" class="fs110">{$}</a> <br />

LinkX / Banner Rotation Within LinkX
« on: April 21, 2012, 11:21:29 AM »
You can use the advertisements section of LinkX to have banners rotate on page loads.

Use tags to limit category displays.

Code: [Select]
{nocache}{ad tags=fordbanners pagedupes=false weight=&quot;=1&quot;}{/nocache}

{nocache}{ad tags=dodgebanners pagedupes=false weight=&quot;=1&quot;}{/nocache}

Thanks Smutty

TgpX(SE) / Feed Keywords/Tags To search.php
« on: April 21, 2012, 11:15:13 AM »
You can split your keywords into separate tags/keywords and then search them with your search.php script.

Code: [Select]
{assign var= $link.keywords value=explode(' ', $link.keywords)}
{foreach var= $keyword from= $link.keywords}
<a href="{$config.base_url}/search.php?s={$keyword}">{$keyword|htmlspecialchars}</a>

Thanks clit

TubeX / Trimming Descriptions
« on: April 21, 2012, 10:47:03 AM »
If you've got some long gallery descriptions that you want to fit in a table without wrapping, you can trim them down to a specific length using a bit of template code

Trim gallery descriptions to 50 characters
Code: [Select]

Trim gallery descriptions to 50 characters and add an ellipsis (...) to the end to indicate descriptions that have been trimmed
Code: [Select]
{$gallery.description|substr::0::50|htmlspecialchars|trim}{if strlen($gallery.description) > 50}...{/if}

You can trim your descriptions and convert their text case at the same time.

Trim gallery descriptions to 50 characters and convert first letter of each word to upper case
Code: [Select]

Thanks Jeremy and duno

TgpX(SE) / Uniform Description Text Case
« on: April 21, 2012, 10:38:01 AM »
If your gallery descriptions are not uniform with their use of text case you can convert them using a few different template modifiers.

All letters upper case
Code: [Select]

All letters lower case
Code: [Select]

First letter upper case, all others lower case
Code: [Select]

First letter of each word upper case, all others lower case
Code: [Select]

More info:

Thanks Jeremy

TubeX / Category Specific, Tag Specific Text Link Blocks
« on: April 20, 2012, 10:44:18 AM »
Did you know that you can use the TubeX Banner function to easily add specific ( or random ) text-link blocks to your pages?

Just add your anchor tags and text into the banner html box.  Then use the {banner} function to select the code for display.

For instance, to select a text or text-link block based on the category value of your page, you would place this code where you want the block inserted.

{banner zone="Text Link Block" tags=$}

This assumes that you have created a text-link block for each category you use.  If not, you can use conditionals to a choose default or random block for categories for which you have not yet created a text-link block.

Code: [Select]
<div id="textlinks">

{capture var=$banner}{banner zone="Text Link Block" tags=$}{/capture}
   {if empty($banner)}
      {banner zone="Text Link Block" tags="default" sort="`times_displayed` ASC"}
      {banner zone="Text Link Block" tags=$ sort="`times_displayed` ASC"}


This assumes that you have at least one text link block tagged with default.

Please post your requests for customizing this code.

TubeX / Toplist Integration Into TGPX / TubeX Templates
« on: April 19, 2012, 10:50:26 PM »
Easily integrate any file (almost) into your TGPX / TubeX templates using the {file} function for TubeX, or the {include} function for TGPX.

Used most often with toplist files and any text or text-link files:

Ex: {file filename="/SERVER-PATH-TO/toplist.html"}

Pages: 1 2 3