Author Topic: Special Category For Honored Images selected By Admin  (Read 26574 times)

0 Members and 1 Guest are viewing this topic.

Offline son_gokou

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Special Category For Honored Images selected By Admin
« on: January 10, 2007, 04:25:29 PM »
Does anyone have this mod and could show me?

I've searched many pages in this forum and couldnīt find it :(

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Special Category For Honored Images selected By Admin
« Reply #1 on: January 10, 2007, 06:11:59 PM »
why you don't move the images to a "special category"???

Offline son_gokou

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: Special Category For Honored Images selected By Admin
« Reply #2 on: January 10, 2007, 06:52:38 PM »
Sorry I didnīt explain all that I want.

I didnīt create the "special category" normally because:

- I donīt want the images just in the "special category". I want them in the regular category and in the "special category".

- I donīt want the "special category" in the place where the categories are.


I donīt know if you can understand (its my fault), so I give you an example: http://www.fotografia-na.net/index.php?l=english
It's like that.

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Special Category For Honored Images selected By Admin
« Reply #3 on: January 10, 2007, 07:17:13 PM »
Add this line to "includes/db_field_definitions.php":
Code: [Select]
$additional_image_fields['honored'] = array($lang['honored'], "radio", 1);

Then add this line to your language files (main.php):
Code: [Select]
$lang['honored'] = "Honored:";
create an new field (honored) in the 4images_images table...
Code: [Select]
ALTER TABLE 4images_images ADD honored TINYINT(1) DEFAULT '0' NOT NULL;
Create a new column in the table 4images_wordmatch called honored_match
Code: [Select]
ALTER TABLE 4images_wordmatch ADD honored_match TINYINT(1) DEFAULT '0' NOT NULL;

Open includes/search_utils.php and find this part
Code: [Select]
$search_match_fields = array(
  "image_name" => "name_match",
  "image_description" => "desc_match",
  "image_keywords" => "keys_match"
);
add a new line to the array:
Code: [Select]
$search_match_fields = array(
  "image_name" => "name_match",
  "image_description" => "desc_match",
  "image_keywords" => "keys_match",
  "honored" => "honored_match"
);
Note the comma added behind the third line!

Go in the control panel and edit one image, in the bottom of the site you will find a new radio button...

Rebuild the search index.
You can use the plugin from here.

For the List on the main page i will give you the next hint when these modifications will work...

I hope you are now enable to use .../search.php?honor=1

GOOD SPEED!

Offline son_gokou

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: Special Category For Honored Images selected By Admin
« Reply #4 on: January 11, 2007, 12:37:26 AM »
It's almost everything done except the stepts:

create an new field (honored) in the 4images_images table...

Code:
ALTER TABLE 4images_images ADD honored TINYINT(1) DEFAULT '0' NOT NULL;
Create a new column in the table 4images_wordmatch called honored_match

Code:
ALTER TABLE 4images_wordmatch ADD honored_match TINYINT(1) DEFAULT '0' NOT NULL;

Can you tell how I should do this?

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Special Category For Honored Images selected By Admin
« Reply #5 on: January 11, 2007, 09:04:40 AM »
Hmm.... Use phpmyadmin or something like that...

Offline sumer

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Special Category For Honored Images selected By Admin
« Reply #6 on: January 12, 2007, 10:04:08 AM »
i think the way you should go about this is, basicly
the same way you can clone the

//-----------------------------------------------------
//--- Show New Images ---------------------------------
//-----------------------------------------------------

in index.php

To create " Show Most ViewedImages " section via using thumbnails_bit.php

and the rest.. i dont know.. but basicly its more of a " FEATURED IMAGE" concept.
the LATEST featured images then get listed on the top 10 or whatever the limit you set .

however there isnt a way to feature an image in the admin.  is there?
if there is something special an admin can do to an image then the sql command can ask it to list it based on that special tag.  and then re-arrange it based on date and limit it to10.

 :flag-de: :flag-de: :flag-de: :flag-de:

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Special Category For Honored Images selected By Admin
« Reply #7 on: January 12, 2007, 10:33:35 AM »
@ sumer

... the request was not "Most ViewedImages" ...
... the request was "Honored Images selected By Admin" ...
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 son_gokou

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: Special Category For Honored Images selected By Admin
« Reply #8 on: January 13, 2007, 04:54:29 PM »
Thanks for all replys I apreciate any help I can get.
As mawenzi said I want Honored Images not Most Viewed Images.
The Acidgod modification explanation is perfect. I'm doing all good without much effort.


Quote
Create a new column in the table 4images_wordmatch called honored_match

Code:
ALTER TABLE 4images_wordmatch ADD honored_match TINYINT(1) DEFAULT '0' NOT NULL;

Here, it was creating a column or field?


Quote
For the List on the main page i will give you the next hint when these modifications will work...

I hope you are now enable to use .../search.php?honor=1

So... I've done everything.
Why that plugin is needed?

To finish give me the next hint you have told, please.
« Last Edit: January 13, 2007, 06:58:27 PM by son_gokou »

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Special Category For Honored Images selected By Admin
« Reply #9 on: January 14, 2007, 01:51:21 PM »
Quote
For the List on the main page i will give you the next hint when these modifications will work...

I hope you are now enable to use .../search.php?honor=1

And this works???

Offline son_gokou

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: Special Category For Honored Images selected By Admin
« Reply #10 on: January 14, 2007, 06:28:27 PM »
I mark one or more images for "honored", I use .../search.php?honor=1 but none image was found.

Offline gustav

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: Special Category For Honored Images selected By Admin
« Reply #11 on: January 14, 2007, 08:00:21 PM »
Why not simply add the keyword "honored" to the keywords list of the pics that you wanna honor and then add a search link... like search.php?search_keywords=honored to automatically show all images that have the "honored" in their keywords?.... not sure though, if this works without defining a special cat_id in the searchlink!? But it would definately be the easiest way.... I'm sure someone here can tell you how to define the searchlink correctly.
« Last Edit: January 15, 2007, 02:52:12 PM by gustav »

Offline son_gokou

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: Special Category For Honored Images selected By Admin
« Reply #12 on: January 15, 2007, 02:12:42 PM »
I think that wont be necessary if Acidgod finish the mod  :)

Offline gustav

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: Special Category For Honored Images selected By Admin
« Reply #13 on: January 15, 2007, 02:53:52 PM »
yeah.. but using the simple search methode does not even require a mod..... just ad a special keyword to all pics you wanna honor... and then perform a search for this keyword.... easier it can't get. ;)

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Special Category For Honored Images selected By Admin
« Reply #14 on: January 15, 2007, 03:09:10 PM »
@ gustav
... you are absolutely right ... ;)

@ son_gokou
... and as a link you can use in your templates / menue /...
Code: [Select]
<a href="http://www.your_site.com/.../search.php?search_keywords=honored">Honored Images</a>
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) ...