4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: impss on June 05, 2007, 07:41:36 PM

Title: (Help) Template tag for custom user DB field
Post by: impss 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.
Title: Re: (Help) Template tag for custom user DB field
Post by: impss 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.
Title: Re: (Help) Template tag for custom user DB field
Post by: mawenzi on June 05, 2007, 11:09:48 PM
... a very fast answer ...  :mrgreen:
Title: Re: (Help) Template tag for custom user DB field
Post by: impss 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: