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.


Messages - LadyCherry

Pages: [1]
1
Oh My!! You are my GOD V@no!!

*Hugs and Kisses*

It looks like its working!!

I also did this to the categories.php and it works too!

I will add that to my tutorial at the top if its ok with you?

-Lady Cherry

2
Opps Sorry V@no I should have posted how I put the line in.

Dont laugh if im completely wrong Im very new to this.

Code: [Select]
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
          FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
          WHERE i.image_active = 1
          $sql_where_query
          AND c.cat_id = i.cat_id AND i.cat_id (($user_info['user_gallerynudity']) ? "" : "AND i.Nudity <> 1") IN ($cat_id_sql)
          ORDER BY ".$config['image_order']." ".$config['image_sort']."
          LIMIT $offset, $perpage";
  $result = $site_db->query($sql);

  $thumbnails = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";

Thank You for all of your help hun I appreicate it,

-Lady Cherry

3
Im sort of new and I appreciate your help very much so.

I get the following error with that line of code:

Code: [Select]
parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
Thank you again for all of your patience.

-Lady Cherry

4
Hi Vano.

In your example you do not have this:
Code: [Select]
IN ($cat_id_sql)
Did you purposly remove that?

It is odd that I dont get a SQL error.

In Fact I just realized that if I set Nudity to Yes in the user control panel ALL I see is nude images lol.

Any ideas on why that is?

Also Are you missing something from this:

Code: [Select]
(($user_info['user_gallerynudity']) ? "AND i.Nudity <> 1" : "")
Shouldnt it be something like this statement?:
Code: [Select]
(($user_info['user_gallerynudity'] == 1) ? "AND i.Nudity <> 1" : "")
Thanks for your time

-Lady Cherry

5
Ok so in the search.php I replace:
Code: [Select]
          WHERE i.image_active = 1
          $sql_where_query
          AND c.cat_id = i.cat_id AND i.cat_id IN ($cat_id_sql)
          ORDER BY ".$config['image_order']." ".$config['image_sort']." 


With:
Code: [Select]
          WHERE i.image_active = 1
          $sql_where_query
          AND c.cat_id = i.cat_id AND i.cat_id ".(($user_info['user_gallerynudity']) ? "AND i.Nudity <> 1" : "")." IN ($cat_id_sql)
          ORDER BY ".$config['image_order']." ".$config['image_sort']."

It seems to have no effect on the nude images is there something I am missing still?

-Lady Cherry

6
You can view this working at:
http://rendervisions.com -Click on the galleries link at the top-

1) The first part is creating a warning that an image contains nudity under the thumbnail of that image.
2) The second part is creating a toggle in the Users control panel that allows the user to select yes or no to viewing nudity in the search, categories and details pages of the gallery.
3) The third part is the mod to hide the images that contain nudity if the user has selected No to viewing Nudity in the gallery, in his/her control panel (You must complete step 1 and 2 for this to work).

(Remember its allways good practice to backup the files you are going to modify, just in case you need to restore before your changes)

Part 1
Displaying a Warning message under images that contain nudity.

OPEN: includes/db_field_definitions.php

Near the bottom ADD:
Code: [Select]
$additional_image_fields['Nudity'] = array("Image contains nudity", "radio", 1);
OPEN:  templates/*Your Template*/member_uploadform.html

FIND:
Code: [Select]
            <td class="row2"><b>{lang_image_name}</b></td>
            <td class="row2"><input type="text" name="image_name"  size="30" value="{image_name}" class="input" /></td>
          </tr>

After ADD:
Code: [Select]
            <tr><td class="row1" align="left"><center>
              <div align="left"><u><b>Image Contains</b></u><br>
              </div>
              <div align="left"><u><b> Nudity?</b></u><br>
              </div>
              <div align="left"><font size="1">(shows up under the thumbnail image)</font></div>
</center></td>
            <td align="left" class="row1">
              <div align="left">
              </div>
              <b>Image Contains Nudity</b><br>

-Click below if applicable-<br>


              <div align="left">
              </div>
              <input type="radio" name="Nudity" value="1"> Yes&nbsp;&nbsp;&nbsp;
              <input type="radio" name="Nudity" value="0" checked="checked"> No
<br>


              <div align="left">

              <br>
              <br>
              </div>
</td>
          </tr>

OPEN: templates/*Your Theme*/thumbnail_bit.html

FIND:
Code: [Select]
{if allow_comments}{lang_comments} {image_comments}{endif allow_comments}<br />
After ADD:
Code: [Select]
{if Nudity}<font color=red>Warning: Nudity</font><br>
        {endif Nudity}

Open Your Mysql with something like phpmyadmin.

In the following tables: 4images_images, 4images_images_temp
Add the following fields:

Feild Name: Nudity
Type: TINYINT
Length/Values: 4
Default: 0

Now when your Users go to upload thier image they will have a nudity check box. The user will be able to select yes or no if their image has nudity or not. This will also display a Tag under the thumbnail of the image that says Warning: Nudity if the image contains nudity


Part 2
What I wanted to create was a Yes no toggle in the control panel for users to be able to select yes or no to viewing Nudity in the new images, Categories, and details pages.

I created the toggle in the control for users to select Yes or no to view nudity:

Open: includes/db_field_definitions.php

Near the bottom add:
Code: [Select]
$additional_user_fields['user_gallerynudity'] = array("Show Nudity In Gallery", "radio", 1);

Open: templates/*YourTemplate*/member_editprofile.html

Find
Code: [Select]
          <tr>
            <td class="row1"><b>{lang_invisible}</b></td>
            <td class="row1">
              <input type="radio" name="user_invisible" value="1"{user_invisible_yes} />
              {lang_yes}&nbsp;&nbsp;&nbsp;
              <input type="radio" name="user_invisible" value="0"{user_invisible_no} />
              {lang_no}
                        </td>
          </tr>

After ADD:
Code: [Select]
          <tr>
            <td class="row2"><b>Show Nudity in Gallery</b></td>
            <td class="row2">
              <input type="radio" name="user_gallerynudity" value="1"{user_gallerynudity_yes} />
              {lang_yes}&nbsp;&nbsp;&nbsp;
              <input type="radio" name="user_gallerynudity" value="0"{user_gallerynudity_no} />
              {lang_no}
                        </td>
          </tr>

Next open your MYSQL user table using something like phpmyadmin and add the following field to your 4images_users table:

Feild: user_gallerynudity
Type: TINYINT
Length/Value: 4
Default: 0

Part 3
Hiding the thumbnails of Nude images if the user has selected NO to viewing Nude images in the gallery user control panel.

(I wanted to give a very sincere thank you to V@no for showing me exactly what needed to be done to get this part working. *Thank you V@no!!*)

The search.php file will also hide or unhide nude images in your "New Images" page.

OPEN: search.php

FIND:
Code: [Select]
          WHERE i.image_active = 1
          $sql_where_query
          AND c.cat_id = i.cat_id AND i.cat_id IN ($cat_id_sql)

After ADD:
Code: [Select]
".(($user_info['user_gallerynudity']) ? "" : " AND i.Nudity <> 1")."
END RESULT WILL LOOK LIKE:
Code: [Select]
  $sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
          FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
          WHERE i.image_active = 1
          $sql_where_query
          AND c.cat_id = i.cat_id AND i.cat_id IN ($cat_id_sql)".(($user_info['user_gallerynudity']) ? "" : " AND i.Nudity <> 1")."
          ORDER BY ".$config['image_order']." ".$config['image_sort']."
          LIMIT $offset, $perpage";

OPEN: categories.php

FIND:
Code: [Select]
        WHERE i.image_active = 1 AND i.cat_id = $cat_id AND c.cat_id = i.cat_id
After ADD:
Code: [Select]
".(($user_info['user_gallerynudity']) ? "" : " AND i.Nudity <> 1")."
END Result will Look Like:
Code: [Select]
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND i.cat_id = $cat_id AND c.cat_id = i.cat_id ".(($user_info['user_gallerynudity']) ? "" : " AND i.Nudity <> 1")."
        ORDER BY ".$config['image_order']." ".$config['image_sort']."
        LIMIT $offset, $perpage";

OPEN: index.php

FIND:
Code: [Select]
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").")
After ADD:
Code: [Select]
".(($user_info['user_gallerynudity']) ? "" : " AND i.Nudity <> 1")."
End result will Look Like:
Code: [Select]
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").")".(($user_info['user_gallerynudity']) ? "" : " AND i.Nudity <> 1")."
        ORDER BY i.image_date DESC
        LIMIT $num_new_images";

Save all files and exit.

Again I wanted to thank you V@no for your help, I couldnt have completed Part 3 without you!

I hope this helps anyone out there that needs to exclude images when a user selects to in the user control panel.

Thank you
-Lady Cherry



7

Im toying around and I have tried to input that line with no luck any ideas where abouts it would go?

Thanks for your time, im kinda a noob as far as this goes.

Thanks

-Lady Cherry

8
Hey WhiteRabbit,

I will try your tutorial tonight.

My question is how do you incorperate that search with a users setting in the users control panel?

I want the user to be able to check nudity or No Nudity and any of thier searches will not show nudity if they select not to in thier user control Panel.

Thanks
-Lady Cherry

9
Can anyone give a solution that uses the MySQL tables?

(I do not want to use the search field for what im trying to accomplish)

Thank you
-Lady Cherry

10
Hi TheOracle
That would be good for a non mysql/php solution.

I wanted one where the User can select if they wanted to view nudity or not in thier control panel and it would store thier settings in the user table.

Also the php script would check the 4images_images table if the image contains nudity or not.

Does anyone know have a solution for this?

any help is appreciated!

-Lady Cherry

11
Can anyone please help with this?

I would really appreciate it!

Thanks
-Lady Cherry

12
Mods & Plugins (Requests & Discussions) / Re: PHP.INI Question ?
« on: June 28, 2005, 05:33:21 PM »
Hi there,

Im not at my server right now but you should be able to find a couple of lines that say size limit or upload limit in your php.ini file. I beliebe by default they are set to 4MB change this to whatever you think it should be at.

-Lady Cherry

13
I allready have a field in the 4images_images table that says nudity. When people add an image they select nudity in the member_uploadimage.html then it shows under the thumbnail saying: Warning nudity.

This is what I need::
1) Create a field in the 4images_images table called nudity --Done--
2) In the members_uploadimage.html create a radio selection yes or no that the image they are uploading contains nudity. --Done--
3) To create a field in the USERS table that says nudity. --Done--
4) in the user's control panel create a radio field that says yes or no to nudity. (this allows the user to decide if they want to see nudity or not) --Done--
5) In the search.php file create a statement that will not display nude images if the User has selected not to view nude images. But display nude images if the user selected to view them.

I have allready Done Steps 1 - 4
But I have no idea how to do step 5 What the wording of the code would be. All I know is I want it to be..
Something like:

Code: [Select]
If 4images_images nudity field = 1(image contain nudity) and Users_table nudity field = 0 (Do not show nudity in control panel selected)
then
do not display this image in the thumbnails of the search.


Can anyone help me with this at all? Please I would even donate to your paypal account if you can help me!

Thanks for your time!

-Lady Cherry

_____________________________________________________________________________________________


I allready haben auffangen in der Tabelle 4images_images, die
Nacktheit sagt. Wenn Leute ein Bild addieren, wählen sie Nacktheit im
member_uploadimage vor.HTML, sich dann, das es unter dem thumbnail Saying zeigt: Warnende Nacktheit.

Dieses ist, was ich: benötige:
1) verursachen auffangen in der Tabelle 4images_images, die die
Nacktheit genannt wird -- erfolgt --
2) im members_uploadimage.HTML verursachen eine Radiovorwähler ja oder kein, der das Bild, das
sie hochladen, Nacktheit enthält. -- getan --
3) auffangen in der Anwendertabelle verursachen, die
Nacktheit sagt. -- getan --
4) in der verkleidung des Benutzers Steuerstellen einen Radio
auffangen her, der ja oder nicht zur Nacktheit sagt. (dieses erlaubt dem Benutzer, zu entscheiden, wenn sie Nacktheit sehen
möchten oder nicht) -- getan --
5) in der Suche.php Akte verursachen eine Aussage, die nicht nude Bilder anzeigt, wenn
der Benutzer, um vorgewählt hat nude Bilder nicht anzusehen. Aber Anzeige nude Bilder wenn der Benutzer vorgewählt, sie anzusehen.

Ich habe allready erfolgte Schritte 1 - 4
Aber ich habe keine Idee, wie man zu Schritt 5 tut, was der
Wording des Codes sein würde. Aller, den ich weiß, ist ich wünschen es sein.
Etwas mögen:

Code: [Select]
If fangen 4images_images Nacktheit = 1(image
enthalten Nacktheit) auf und Users_table Nacktheit fangen = 0
auf (zeigen Sie Nacktheit nicht in der vorgewählten
Steuerverkleidung)
dann
zeigen Sie nicht dieses Bild in den thumbnails der Suche an.

Kann jemand mir mit diesem an allen helfen? Bitte würde ich sogar zu Ihrem paypal Konto spenden, wenn Sie mir
helfen können!
Dank während Ihrer Zeit!
-Lady Cherry

14
Im at a loss.

I upgraded my servers PHP to: PHP 5.0.4
and Mysql to: 4.1.11

Now whenever someone tries to submit an image they get a blank page after they hit the submit button.
I cant figure it out for the life of me.

It was working fine before I upgraded mysql and php.

If anyone can help I would appreicate it greatly!

Thank you
-Lady Cherry

15
Hi,

There used to be a link to how to intergrate the logins for phpnuke into 4images.
Since the forums have been changed here it has been lost.

I just upgraded my phpnuke install and I was wondering if anyone still had the login intergration file somewhere?

Since no one did I am going to post the one I found here. Let all the credit go to the original creator of this doc file!

http://library.rendervisions.com/public/4imagesphpnukeuserintergration.doc

Hope this helps everyone!
Again thanks goes out to the original creator of this doc file!
-Lady Cherry

Pages: [1]