Author Topic: Bookmark - none mod.  (Read 11482 times)

0 Members and 1 Guest are viewing this topic.

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.808
  • I ♥ 4I
    • View Profile
Bookmark - none mod.
« on: October 16, 2009, 12:43:55 PM »
Hallo zusammen,

ich bin grad dabei eine Bookmark Mod zu basteln, doch leider bisher ohne Erfolg:

Folgendes habe ich bisher gemacht:

admin/settings.php
Das habe ich eingefügt:
  show_table_separator($setting_group[10], 2"setting_group_10");
  
show_setting_row("bookmark_details""radio");


lang/sprache/admin.php
/*-- Setting-Group 10 --*/
$setting_group[10]="Bookmark Config";
$setting['bookmark_details'] = "Bookmarks auf der Detailsseite?";


details.php
Über print out das:
if($config['bookmark_details'] == 1)  {
         
$birthday_message $site_template->parse_template("bookmark_details");
         
$site_template->register_vars(array(
                      
"bookmark_details" => $bookmark_details
              
));
    }


includes/de_field_definitions.php
$additional_user_fields['bookmark_details'] = array($lang['bookmark_details'], "text"0);

bookmark_details_install.php
<?php

define
('ROOT_PATH''./');
include(
ROOT_PATH.'config.php');
include(
ROOT_PATH.'global.php');


$sql_data = array(
   
"INSERT INTO `".SETTINGS_TABLE."` ( `setting_name` , `setting_value` ) VALUES ('bookmark_details', '1')"

);

foreach (
$sql_data as $val){
	
if (
$site_db->query($val)) {
 
	
  
$log[$val] = "Succesfully updated Database";
	
}
	
else {
	
  
$log[$val] = "<font color=\"red\">Error</font>";
	
  
$error 1;
    }
}

if (!
$error) echo "Succesfully updated Database";
else echo 
"an Error occured";


?>


Und der entsprechende Teil in der bookmark_details.html

Führe ich die install aus, dann kommt ein error :D
Ich weis nicht was noch fehlt.
Was ich auch möchte ist, dass man im Admin einstellen kann wo das Bookmark angezeigt werden soll.
Details, index, profil, kategorien
« Last Edit: October 16, 2009, 09:49:13 PM by Sumale.nin »

Offline kai

  • Administrator
  • Addicted member
  • *****
  • Posts: 1.423
    • View Profile
    • 4images - Image Gallery Management System
Re: Bookmark Mod
« Reply #1 on: October 16, 2009, 01:35:36 PM »
Any demo available?
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.808
  • I ♥ 4I
    • View Profile
Re: Bookmark Mod
« Reply #2 on: October 16, 2009, 01:40:51 PM »
Hi,

dass ist nicht möglich, da die Modifikation nicht läuft? Es wird nichts angezeigt und die install.php geht auch nicht. Daher wollte ich mal fragen was da noch fehlt damit die Mod läuft.

Sollte die Mod laufen, kann man das ebenfalls hier sehen: http://4images-aio.benny-boehnke.info/index.php

Rembrandt

  • Guest
Re: Bookmark Mod
« Reply #3 on: October 16, 2009, 03:42:51 PM »
Hi!

ich habe dir mal den installer dranngehängt.

mfg Andi

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.808
  • I ♥ 4I
    • View Profile
Re: Bookmark - none mod.
« Reply #4 on: October 16, 2009, 09:49:52 PM »
Hi,

ich danke dir. Aber es wird in der Detailsansicht nichts angezeigt. Woran kann das liegen?

Rembrandt

  • Guest
Re: Bookmark - none mod.
« Reply #5 on: October 17, 2009, 12:40:44 PM »
Hi!
...
 Aber es wird in der Detailsansicht nichts angezeigt. Woran kann das liegen?
in deiner detail.php parst du
Quote
$birthday_message = $site_template->parse_template("bookmark_details");
diese bookmark_details gibt es gar nicht, und ich denke die wirst du auch nicht brauchen.

weiters registrierst du eine variable "$bookmark_details"  die leer ist
Quote
$site_template->register_vars(array(
                      "bookmark_details" => $bookmark_details ));
es gibt keine varibale "$bookmark_details" mit irgend einem inhalt, somit wird auf der detail seite nichts angezeigt.

so könntest du es machen, vorrausgesetzt in ".SETTING." tabel steht das feld ['bookmark_details'] auf '1'.

if($config['bookmark_details'] == 1)  {
      
$bookmark_details "Schau";
      
$bookmark_details .= " mal,";
      
$bookmark_details .= " das";
      
$bookmark_details .= " bist";
      
$bookmark_details .= " du";
      
$bookmark_details .= " ;)";
      
//$birthday_message = $site_template->parse_template("bookmark_details");
	
	
 
       
$site_template->register_vars("bookmark_details"$bookmark_details);
  }

mittels {bookmark_details} in der details.html kannst du das ganze jetzt darstellen.

mfg Andi

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.808
  • I ♥ 4I
    • View Profile
Re: Bookmark - none mod.
« Reply #6 on: October 18, 2009, 01:02:59 PM »
Hi,

nun kann ich es im Adminpanel ein und ausschalten, aber es wird mir nur der Text angezeigt, aber nicht das was in der bookmark_details.html steht!
Muss man das auch noch irgendwo angeben?

So
$bookmark_details .= $site_template->register_vars("bookmark_details"$bookmark_details);
und so
$bookmark_details $site_template->register_vars("bookmark_details"$bookmark_details);
geht das auch nicht :D (ich weis zwar nicht was ich da mache, aber ich versuche :P )

Rembrandt

  • Guest
Re: Bookmark - none mod.
« Reply #7 on: October 18, 2009, 01:18:19 PM »
Hi!
...
Muss man das auch noch irgendwo angeben?

So
$bookmark_details .= $site_template->register_vars("bookmark_details"$bookmark_details);
und so
$bookmark_details $site_template->register_vars("bookmark_details"$bookmark_details);
geht das auch nicht :D (ich weis zwar nicht was ich da mache, aber ich versuche :P )

das habe ich ja in meinen vorigen post geschrieben
Quote
diese bookmark_details gibt es gar nicht,
in deinen eingangspost ist sie nicht vorhanden darum habe ich sie auskommentiert.
$birthday_message .= $site_template->parse_template("bookmark_details");

mfg Andi

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.808
  • I ♥ 4I
    • View Profile
Re: Bookmark - none mod.
« Reply #8 on: October 18, 2009, 01:35:21 PM »
Wie mache ich das dann?
die Datei bookmark_details.html ist vorhanden.
Wie macht man das dann, dass diese dann auch ausgegeben wird?

Beispiel:
   $bookmark_details "<table>/n";
   
$bookmark_details .= "<tr class=\"imagerow2\">\n";
   
$site_template->register_vars("bookmark_details"$bookmark_details);
   
$bookmark_details .= "</tr>\n";
   
$bookmark_details .= "</table>\n";


Das ist jetzt nur ein Beispiel. Aber so hatte ich mir das gedacht!

Rembrandt

  • Guest
Re: Bookmark - none mod.
« Reply #9 on: October 18, 2009, 05:21:12 PM »
mach eine "bookmark_details_bit" draus, sonst kennt sich wieder keiner aus.
if($config['bookmark_details'] == 1)  {
   
$birthday_message $site_template->parse_template("bookmark_details_bit");
	
	
 
       
$site_template->register_vars("bookmark_details"$bookmark_details);
  }


da du aus der "bookmark_details_bit.html" so ein geheimnis machst, keine ahnung ob du die tabel - tr angaben in der php datei brauchst.

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.808
  • I ♥ 4I
    • View Profile
Re: Bookmark - none mod.
« Reply #10 on: October 18, 2009, 09:39:49 PM »
Danke dir.
Dort drin steht einfach nur

"TEST DETAILS"

Warumm soll das ein Geheimnis sein?

Edit:

Das klappt aber nicht in der index.php
if($config['bookmark_home'] == 1)  {
   
$bookmark_home $site_template->parse_template("bookmark_bit");

	


	


 
       
$site_template->register_vars("bookmark_home"$bookmark_details);
  }


Und das auch nicht:
if($config['bookmark_home'] == 1)  {
    
$user_birthday explode("-",$user_info[$user_table_fields['birthday']]);
    if ((
$user_birthday[1] == date ("m"time())) && ($user_birthday[2] == date ("d"time()))) {
         
$bookmark_home $site_template->parse_template("bookmark_bit");
         
$site_template->register_vars(array(
                      
"bookmark_home" => $bookmark_home
              
));
    }
}


In der details.php
if($config['bookmark_details'] == 1)  {
   
$bookmark_details $site_template->parse_template("bookmark_bit");
       
$site_template->register_vars("bookmark_details"$bookmark_details);
  }


Das klappt, ebenfalls in der member.php
if($config['bookmark_member'] == 1)  {
   
$bookmark_member $site_template->parse_template("bookmark_bit");
       
$site_template->register_vars("bookmark_member"$bookmark_member);
  }


Nur in der index.php nicht! Woran liegt das?

« Last Edit: October 18, 2009, 11:09:27 PM by Sumale.nin »

Rembrandt

  • Guest
Re: Bookmark - none mod.
« Reply #11 on: October 19, 2009, 04:43:36 AM »
....Das klappt aber nicht in der index.php.....

schreibfehler:
Quote
$site_template->register_vars("bookmark_home", $bookmark_home);

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.808
  • I ♥ 4I
    • View Profile
Re: Bookmark - none mod.
« Reply #12 on: October 19, 2009, 10:30:26 AM »
Jo,
danke dir. Manchmal sieht man soetwas überhauptnicht!
Danke danke danke!

Aber ich bekomme in der home.html nichts angezeigt.
Das steht in der index.php
if($config['bookmark_home'] == 1)  {
   
$bookmark_home $site_template->parse_template("bookmark_bit");
       
$site_template->register_vars("bookmark_home"$bookmark_home);
  }
  
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------


Und in der home.html
Code: [Select]
{bookmark_home}
In der DB ist der Eintrag auch vorhanden.
« Last Edit: October 19, 2009, 10:43:11 AM by Sumale.nin »

Rembrandt

  • Guest
Re: Bookmark - none mod.
« Reply #13 on: October 20, 2009, 09:10:21 PM »
tjo keine ahnung, funktioniert einwandfrei.
hast du auch ein feld in der DB das bookmark_home heißt?

auf meiner demo seite läuft es auch.

mfg Andi

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.808
  • I ♥ 4I
    • View Profile
Re: Bookmark - none mod.
« Reply #14 on: October 21, 2009, 09:39:56 AM »
selbstverständlich.
Vielleicht wieder ein Rechtschreibfehler :D
Werde mir das heute Abend mal ansehen!