Author Topic: (Help) Template tag for custom user DB field  (Read 5130 times)

0 Members and 1 Guest are viewing this topic.

Offline impss

  • Sr. Member
  • ****
  • Posts: 382
    • View Profile
    • Cusstom.net
(Help) Template tag for custom user DB field
« on: June 05, 2007, 07:41:36 PM »
Hey all , I ran into a problem that i can't seem to get working.

I am trying to make a template tag to disallow thumbnails in my custom thumbnail_bit_10.html , depending on what the user has chosen in there control panel.

Here is what i Have done so far

In db_field_definitions.php i added:
Code: [Select]
$additional_user_fields['user_adult_view'] = array($lang['user_adult_view'], "radio", 0);
In the Database under 4images_users  i created a new feild called user_adult_view tinyint(1)   No Null and Defualt 0

In member_editprofile.html i added:
Code: [Select]
<tr>
            <td class="row2"><b>Allow Adult Images?</b></td>
            <td class="row2">
              <input type="radio" name="user_adult_view" value="1"{user_adult_view_yes} />
              <b>Yes</b>&nbsp;&nbsp;&nbsp;
              <input type="radio" name="user_adult_view" value="0"{user_adult_view_no} />
              <b>No</b>
            </td>
          </tr>

that field seems to working ok but i can seem to get a template tag working for this modification.

Shouldn't {if user_adult_view}{endif user_adult_view} work in the thumbnail_bit_10.html ?

any help would greatly appreciated.

Offline impss

  • Sr. Member
  • ****
  • Posts: 382
    • View Profile
    • Cusstom.net
Re: (Help) Template tag for custom user DB field
« Reply #1 on: June 05, 2007, 08:43:52 PM »
Nevermind I got it to work  8)

I added:
Code: [Select]
"user_adult_view" => $user_info['user_adult_view'],
to the page_header.php, and now it seems to be working.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: (Help) Template tag for custom user DB field
« Reply #2 on: June 05, 2007, 11:09:48 PM »
... a very fast answer ...  :mrgreen:
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline impss

  • Sr. Member
  • ****
  • Posts: 382
    • View Profile
    • Cusstom.net
Re: (Help) Template tag for custom user DB field
« Reply #3 on: June 05, 2007, 11:12:06 PM »
... a very fast answer ...  :mrgreen:

 :wink:

now i just gotta figure out how to use the custom catogory template in the new images and random images and i will be all set..

but thats a different topic  :lol: