Home   Forum   FAQ   Top Seiten   Dokumentation   Staff   
Letzte Kurzmitteilung - Erstellt von: aom - Donnerstag, 07 Januar 2010 09:17
NEW!! MKPortal FAQ
 
Deutscher MKPortal Support
Willkommen Gast. Bitte einloggen oder registrieren.
Haben Sie Ihre Aktivierungs E-Mail übersehen?
September 09, 2010, 08:23:51

Einloggen mit Benutzername, Passwort und Sitzungslänge
Suche:     Erweiterte Suche
Registrierung wieder aktiv
17472 Beiträge in 2458 Themen von 1616 Mitglieder
Neuestes Mitglied: thunder
* Übersicht Hilfe Suche Kalender Einloggen Registrieren
+  Deutscher MKPortal Support
|-+  English Support
| |-+  General Usage
| | |-+  Search in Image Gallery
0 Mitglieder und 1 Gast betrachten dieses Thema. « vorheriges nächstes »
Seiten: [1] Nach unten     hinzufügen: Mr. Wong hinzufügen: Del.icio.us hinzufügen: Technorati Drucken

Ähnliche Themen *

Dieses Thema wurde bislang nicht bewertet!
Du hast dieses Thema noch nicht bewertet. Wähle eine Bewertung aus:
Autor Thema: Search in Image Gallery  (Gelesen 336 mal)
AirWarrior
AirWarrior
Jr. Mitglied
**

Bewertung: 0
Offline Offline

Beiträge: 79


php noob !!


WWW
Search in Image Gallery
« am: Juli 10, 2010, 13:11:47 »

You can search in image gallery in 2 option:
    *Title
    *Discription

Can we made a third option so we can search on the username of the poster?
Gespeichert

Signed by:
AirWarrior
Dutch-Angels
AirWarrior
AirWarrior
Jr. Mitglied
**

Bewertung: 0
Offline Offline

Beiträge: 79


php noob !!


WWW
Re: Search in Image Gallery
« Antworten #1 am: Juli 13, 2010, 21:49:07 »

Nobody know a solution ?
Gespeichert

Signed by:
AirWarrior
Dutch-Angels
aom
MKP DE Administration
*

Bewertung: 44
Offline Offline

Beiträge: 2681


Balu der Hund


WWW
Re: Search in Image Gallery
« Antworten #2 am: Juli 14, 2010, 20:17:17 »

Sorry, it was too hot for answering.

But it should be clear what to do.
in index.php at gallery module you have to modify this:

   
Code:
$sort = "
<select name=\"order\" size=\"1\" onchange=\"selChoc(this)\"  class=\"bgselect\">
  <option value=\"0\">{$mklib->lang['ga_orderby']}</option>\n
  <option value=\"1\">{$mklib->lang['ga_position']}</option>\n
  <option value=\"2\">{$mklib->lang['ga_namecat']}</option>\n
  <option value=\"3\">{$mklib->lang['ga_datecre']}</option>\n
      </select>


Also you have to modify this:

   
Code:
switch(intval($mkportals->input['order'])) {
case '2':
$order = "ORDER BY `evento`";
    break;
case '3':
$order = "ORDER BY `id` DESC";
    break;
default:
    $order = "ORDER BY `position`";
    break;
}
]

thats it.
Gespeichert

MKP 1.1.2 / SMF 1.1.1
AirWarrior
AirWarrior
Jr. Mitglied
**

Bewertung: 0
Offline Offline

Beiträge: 79


php noob !!


WWW
Re: Search in Image Gallery
« Antworten #3 am: Juli 15, 2010, 18:03:33 »

OK thx i go look to this.
It was very hot last days, you right to stay of the pc.  L&#228;chelnd

I made this
Code:
switch(intval($mkportals->input['order'])) {
case '2':
$order = "ORDER BY `evento`";
    break;
case '3':
$order = "ORDER BY `id` DESC";
    break;
case '4':
$order = "ORDER BY `name`";
    break;
default:
    $order = "ORDER BY `position`";
    break;
}
and this
Code:
$sort = "
<select name=\"order\" size=\"1\" onchange=\"selChoc(this)\"  class=\"bgselect\">
  <option value=\"0\">{$mklib->lang['ga_orderby']}</option>\n
  <option value=\"1\">{$mklib->lang['ga_position']}</option>\n
  <option value=\"2\">{$mklib->lang['ga_namecat']}</option>\n
  <option value=\"3\">{$mklib->lang['ga_datecre']}</option>\n
  <option value=\"4\">{$mklib->lang['ga_name']}</option>\n
      </select>
And in lang_gallery.php
Code:
$langmk['ga_name'] = "Name";
The dutch lang_gallery.php
Code:
$langmk['ga_name'] = "Naam";

But i don't see any changes in Gallery search.
Gespeichert

Signed by:
AirWarrior
Dutch-Angels
aom
MKP DE Administration
*

Bewertung: 44
Offline Offline

Beiträge: 2681


Balu der Hund


WWW
Re: Search in Image Gallery
« Antworten #4 am: Juli 15, 2010, 21:15:36 »

Hi,
name is the wrong fieldname, you have to take "autore"
Gespeichert

MKP 1.1.2 / SMF 1.1.1
AirWarrior
AirWarrior
Jr. Mitglied
**

Bewertung: 0
Offline Offline

Beiträge: 79


php noob !!


WWW
Re: Search in Image Gallery
« Antworten #5 am: Juli 16, 2010, 12:14:49 »

I changed it in "autore"
Code:
switch(intval($mkportals->input['order'])) {
case '2':
$order = "ORDER BY `evento`";
    break;
case '3':
$order = "ORDER BY `id` DESC";
    break;
case '4':
$order = "ORDER BY `autore`";
    break;
default:
    $order = "ORDER BY `position`";
    break;
}
and this
Code:
$sort = "
<select name=\"order\" size=\"1\" onchange=\"selChoc(this)\"  class=\"bgselect\">
  <option value=\"0\">{$mklib->lang['ga_orderby']}</option>\n
  <option value=\"1\">{$mklib->lang['ga_position']}</option>\n
  <option value=\"2\">{$mklib->lang['ga_namecat']}</option>\n
  <option value=\"3\">{$mklib->lang['ga_datecre']}</option>\n
  <option value=\"4\">{$mklib->lang['ga_autore']}</option>\n
      </select>
And in lang_gallery.php
Code:
$langmk['ga_autore'] = "Name";
The dutch lang_gallery.php
Code:
$langmk['ga_autore'] = "Naam";

But i don't see any changes in Gallery search.
Gespeichert

Signed by:
AirWarrior
Dutch-Angels
AirWarrior
AirWarrior
Jr. Mitglied
**

Bewertung: 0
Offline Offline

Beiträge: 79


php noob !!


WWW
Re: Search in Image Gallery
« Antworten #6 am: Juli 16, 2010, 12:51:58 »

I found it
Needed to change this section too
Code:
function search() {
global $mkportals, $DB, $mklib, $Skin, $mklib_board;
$maintit = "{$mklib->lang['ga_searchf']}";
$cselect.= "<option value='1'>{$mklib->lang['ga_title']}</option>\n";
$cselect.= "<option value='2'>{$mklib->lang['ga_des']}</option>\n";
$cselect.= "<option value='4'>{$mklib->lang['ga_autore']}</option>\n";
Gespeichert

Signed by:
AirWarrior
Dutch-Angels
AirWarrior
AirWarrior
Jr. Mitglied
**

Bewertung: 0
Offline Offline

Beiträge: 79


php noob !!


WWW
Re: Search in Image Gallery
« Antworten #7 am: Juli 16, 2010, 13:05:25 »

MMM
No working good.
It gives the same results as search on title and not on user who send it.
Gespeichert

Signed by:
AirWarrior
Dutch-Angels
AirWarrior
AirWarrior
Jr. Mitglied
**

Bewertung: 0
Offline Offline

Beiträge: 79


php noob !!


WWW
Re: Search in Image Gallery
« Antworten #8 am: Juli 16, 2010, 22:07:36 »

I changed lines between line 1612 and 1671
Code:
function search() {
global $mkportals, $DB, $mklib, $Skin, $mklib_board;
$maintit = "{$mklib->lang['ga_searchf']}";
$cselect.= "<option value='3'>{$mklib->lang['ga_autore']}</option>\n";
$cselect.= "<option value='1'>{$mklib->lang['ga_title']}</option>\n";
//$cselect.= "<option value='2'>{$mklib->lang['ga_des']}</option>\n";

$content .= "
    <tr>
      <td>
     
<form action=\"index.php?ind=gallery&amp;op=result_search\" name=\"search\" method=\"post\">
<table width=\"100%\" border=\"0\">
  <tr>
    <td>{$mklib->lang['ga_searchin']}</td>
    <td>
      <select class=\"bgselect\" name=\"campo\" size=\"1\">
      {$cselect}
      </select>
    </td>
  </tr>
  <tr>
    <td width=\"20%\">{$mklib->lang['ga_searchtext']}</td>
    <td width=\"80%\"><input type=\"text\" name=\"testo\" size=\"52\" class=\"bgselect\" /></td>
  </tr>
  <tr>
    <td colspan=\"2\"><input type=\"submit\" value=\"{$mklib->lang['ga_searchstart']}\" class=\"mkbutton\" /></td>
  </tr>
</table>
</form>

      </td>
    </tr>
";
// Link Navigation bar
$navbar = "<a href=\"index.php?ind=gallery\">{$mklib->lang['ga_mkpgal']}</a>{$mklib->lang['bc_sep']}<a href=\"#\">{$mklib->lang['ga_searchf']}</a>";
// Link Navigation bar
$stat = $this->retrieve_stat();
$toolbar = "";
$utonline = $mklib_board->get_active_users("gallery");
$output  = $this->tpl->gallery_show($navbar, $maintit, $content, $submit, $stat, $toolbar, $show_pages, $utonline);
$blocks = $Skin->view_block("{$mklib->lang['ga_imggal']}", $output);
$mklib->printpage("1", "1", $mklib->sitename.$mklib->lang['tt_sep'].$mklib->lang['ga_imggal'].$mklib->lang['tt_sep'].$mklib->lang['ga_searchstart'], $blocks);

}

function result_search() {
global $mkportals, $DB, $mklib, $Skin, $mklib_board;
//$campo = $mkportals->input['campo']; //deprecated
$testo = $mkportals->input['testo'];
$campo = "titolo"; //This is a database table row name - Do not translate!
if (intval($mkportals->input['campo']) == 3) {
$campo = "descrizione"; //This is a database table row name - Do not translate!
$campo = "autore"; //This is a database table row name - Do not translate!
}
if (!$testo) {
$message = "{$mklib->lang['ga_reqstring']}";
$mklib->error_page($message);
exit;
}

This is the search section.
I add this line
Code:
$cselect.= "<option value='3'>{$mklib->lang['ga_autore']}</option>\n";
and add this line
Code:
$campo = "autore"; //This is a database table row name - Do not translate!

Now i can can search on posters name ans search on title.
Search on discription is not working any more.
Gespeichert

Signed by:
AirWarrior
Dutch-Angels
Seiten: [1] Nach oben Drucken 
« vorheriges nächstes »
Gehe zu:  

Powered by SMF 1.1.11 | SMF © 2006, Simple Machines LLC
 
MKPortal C1.2.2 ©2003-2008 mkportal.it
Seite erstellt in 0.07192 Sekunden mit 15 Datenbank Anfragen