smilie-koordinierung

Probleme bei der regulären Arbeiten mit phpBB, Fragen zu Vorgehensweisen oder Funktionsweise sowie sonstige Fragen zu phpBB im Allgemeinen.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.1, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Kane
Mitglied
Beiträge: 122
Registriert: 28.08.2004 10:27
Kontaktdaten:

smilie-koordinierung

Beitrag von Kane »

also ich suche jetzt schon ziemlich lange verzweifelt nach einer funktion wie ich die 16 smilies im 'anworten-fenster' bestimmen kann

es geht mir um die smilies die man sieht wenn man eine antwort schreibt die gleich neben dem fenster sind wo man halt die antwort reinschreibt :D


ich hoffe ich habs gut genug beshcrieben
mfg
Kane
Mario Siebert
Mitglied
Beiträge: 2295
Registriert: 09.12.2003 15:02
Wohnort: Irgendwo im Nirgendwo

Beitrag von Mario Siebert »

Dort werden immer die ersten 16 Smilies die hinzugefügt wurden angezeigt. Wenn du dort andere haben möchtest musst du alle Smilies löschen und die die dort angezeigt werden sollen als erstes hinzufügen.

Grüße Mario
Wer gegen eine geringe Gebühr (höhe der Gebühr bestimmst du selbst!!) ein phpBB installiert oder Mods eingebaut haben möchte sollte sich melden unter: netcom_service@gmx.net - Bisherige Aufträge 68.071
Auf Anfrage führe ich auch Reparaturen/Updates und Serverumzüge durch oder baue Mods!
Kane
Mitglied
Beiträge: 122
Registriert: 28.08.2004 10:27
Kontaktdaten:

Beitrag von Kane »

mmmh gibts keinen mod mit dem man das einfach koordinieren kann ?
mfg
Kane
Mario Siebert
Mitglied
Beiträge: 2295
Registriert: 09.12.2003 15:02
Wohnort: Irgendwo im Nirgendwo

Beitrag von Mario Siebert »

Den habe ich gerade auf meiner HDD gefunden damit kannst du die Smilies im ACP sortieren, ob der allerdings im 2.0.12 noch läuft kann ich nicht sagen da ich ihn lange nicht eingebaut habe:
########################################################
## MOD Title: Smilies Order
## MOD Author: LifeIsPain <brian@orvp.net> (Brian Evans)
## MOD Description: Allows for the smilies order to be changed
## MOD Version: 0.2.0
##
## Installation Level: easy
## Installation Time: 5 Minutes
##
## Files To Edit: 5
## - admin/admin_smilies.php
## - templates/subSilver/admin/smile_list_body.tpl
## - includes/functions_post.php
## - includes/constants.php
## - language/lang_english/lang_admin.php
##
## Included Files: None
########################################################
## MOD History:
##
## v0.1.0 - 05/10/2003
## + initial code
## v0.2.0 - 06/12/2003
## + added smilies pack export support
## + extra code allows for smilies to be added at begining or end
## of list by default
##
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ SQL ]------------------------------------------
#
ALTER TABLE phpbb_smilies ADD smilies_order INT( 5 ) NOT NULL

#
#-----[ SQL ]------------------------------------------
#
INSERT INTO phpbb_config VALUES ('smilies_insert', 1)

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_smilies.php

#
#-----[ FIND ]------------------------------------------
#
for( $i = 0; $i < count($fcontents); $i++ )

#
#-----[ BEFORE, ADD ]------------------------------------------
#
if( $board_config['smilies_insert'] == TOP_LIST )
{
$sql = "SELECT MIN(smilies_order) AS smilies_extreme
FROM " . SMILIES_TABLE;
$shift_it = -10;
}
else
{
$sql = "SELECT MAX(smilies_order) AS smilies_extreme
FROM " . SMILIES_TABLE;
$shift_it = 10;
}

if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get extreme values from the smilies table", "", __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);

$order_extreme = $row['smilies_extreme'] + $shift_it;


#
#-----[ FIND ]------------------------------------------
#
$sql = "INSERT INTO " . SMILIES_TABLE . " (code, smile_url, emoticon)
VALUES('" . str_replace("\'", "''", $smile_data[$j]) . "', '" . str_replace("\'", "''", $smile_data[0]) . "', '" . str_replace("\'", "''", $smile_data[1]) . "')";

#
#-----[ REPLACE WITH ]------------------------------------------
#
//$sql = "INSERT INTO " . SMILIES_TABLE . " (code, smile_url, emoticon)
// VALUES('" . str_replace("\'", "''", $smile_data[$j]) . "', '" . str_replace("\'", "''", $smile_data[0]) . "', '" . str_replace("\'", "''", $smile_data[1]) . "')";

$sql = "INSERT INTO " . SMILIES_TABLE . " (code, smile_url, emoticon, smilies_order)
VALUES('" . str_replace("\'", "''", $smile_data[$j]) . "', '" . str_replace("\'", "''", $smile_data[0]) . "', '" . str_replace("\'", "''", $smile_data[1]) . "', $order_extreme)";
$order_extreme = $order_extreme + $shift_it;

#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT *
FROM " . SMILIES_TABLE;

#
#-----[ REPLACE WITH ]------------------------------------------
#
$sql = "SELECT *
FROM " . SMILIES_TABLE ."
ORDER BY smilies_order";

#
#-----[ FIND ]------------------------------------------
#
$sql = "INSERT INTO " . SMILIES_TABLE . " (code, smile_url, emoticon)
VALUES ('" . str_replace("\'", "''", $smile_code) . "', '" . str_replace("\'", "''", $smile_url) . "', '" . str_replace("\'", "''", $smile_emotion) . "')";

#
#-----[ REPLACE WITH ]------------------------------------------
#
if( $board_config['smilies_insert'] == TOP_LIST )
{
$sql = "SELECT MIN(smilies_order) AS smilies_extreme
FROM " . SMILIES_TABLE;
$shift_it = -10;
}
else
{
$sql = "SELECT MAX(smilies_order) AS smilies_extreme
FROM " . SMILIES_TABLE;
$shift_it = 10;
}

if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't get extreme values from the smilies table", "", __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);

$order_extreme = $row['smilies_extreme'] + $shift_it;

//$sql = "INSERT INTO " . SMILIES_TABLE . " (code, smile_url, emoticon)
// VALUES ('" . str_replace("\'", "''", $smile_code) . "', '" . str_replace("\'", "''", $smile_url) . "', '" . str_replace("\'", "''", $smile_emotion) . "')";

$sql = "INSERT INTO " . SMILIES_TABLE . " (code, smile_url, emoticon, smilies_order)
VALUES ('" . str_replace("\'", "''", $smile_code) . "', '" . str_replace("\'", "''", $smile_url) . "', '" . str_replace("\'", "''", $smile_emotion) . "', $order_extreme)";

#
#-----[ FIND ]------------------------------------------
#
//
// This is the main display of the page before the admin has selected
// any options.
//
$sql = "SELECT *
FROM " . SMILIES_TABLE;

#
#-----[ REPLACE WITH ]------------------------------------------
#
if( $HTTP_GET_VARS['option'] == 'select' && isset($HTTP_POST_VARS['insert_position']) )
{
$sql = "UPDATE " . CONFIG_TABLE . " SET
config_value = '" . $HTTP_POST_VARS['insert_position'] . "'
WHERE config_name = 'smilies_insert'";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Failed to update general configuration for smilies_insert", "", __LINE__, __FILE__, $sql);
}
$board_config['smilies_insert'] = $HTTP_POST_VARS['insert_position'];
}

if( $board_config['smilies_insert'] == TOP_LIST )
{
$pos_top_checked = ' selected="selected"';
$pos_bot_checked = '';
}
else
{
$pos_top_checked = '';
$pos_bot_checked = ' selected="selected"';
}
$position_select = '<select name="insert_position"><option value="' . TOP_LIST . '"' . $pos_top_checked . '>' . $lang['before'] . '</option><option value="' . BOTTOM_LIST . '"' . $pos_bot_checked . '>' . $lang['after'] . '</option></select>';


if( isset($HTTP_GET_VARS['move']) && isset($HTTP_GET_VARS['id']) )
{
$moveit = ($HTTP_GET_VARS['move'] == 'up') ? -15 : 15;
$sql = "UPDATE " . SMILIES_TABLE . "
SET smilies_order = smilies_order + $moveit
WHERE smilies_id = " . $HTTP_GET_VARS['id'];
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't change smilies order", "", __LINE__, __FILE__, $sql);
}

$i = 10;
$inc = 10;

$sql = "SELECT *
FROM " . SMILIES_TABLE . "
ORDER BY smilies_order";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't query smilies order", "", __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
if ($row['smilies_order'] != $i)
{
$sql = "UPDATE " . SMILIES_TABLE . "
SET smilies_order = $i
WHERE smilies_id = " . $row['smilies_id'];
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update order fields", "", __LINE__, __FILE__, $sql);
}
}
$i += $inc;
}

}

//
// This is the main display of the page before the admin has selected
// any options.
//
$sql = "SELECT *
FROM " . SMILIES_TABLE . "
ORDER BY smilies_order";

#
#-----[ FIND ]------------------------------------------
#
"L_EXPORT_PACK" => $lang['export_smile_pack'],

#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_MOVE' => $lang['Move'],
'L_MOVE_UP' => $lang['Move_up'],
'L_MOVE_DOWN' => $lang['Move_down'],
'L_POSITION_NEW_SMILIES' => $lang['position_new_smilies'],
'L_SMILEY_CHANGE_POSITION' => $lang['smiley_change_position'],
'L_SMILEY_CONFIG' => $lang['smiley_config'],

'POSITION_SELECT' => $position_select,
'S_POSITION_ACTION' => append_sid('admin_smilies.' . $phpEx . '?option=select'),

#
#-----[ FIND ]------------------------------------------
#
"U_SMILEY_EDIT" => append_sid("admin_smilies.$phpEx?mode=edit&id=" . $smilies[$i]['smilies_id']),

#
#-----[ BEFORE, ADD ]------------------------------------------
#
'U_SMILEY_MOVE_UP' => append_sid("admin_smilies.$phpEx?move=up&id=" . $smilies[$i]['smilies_id']),
'U_SMILEY_MOVE_DOWN' => append_sid("admin_smilies.$phpEx?move=down&id=" . $smilies[$i]['smilies_id']),


#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/smile_list_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<th class="thTop">{L_EMOT}</th>

#
#-----[ AFTER, ADD ]------------------------------------------
#
<th class="thTop">{L_MOVE}</th>

#
#-----[ FIND ]------------------------------------------
#
<td class="{smiles.ROW_CLASS}">{smiles.EMOT}</td>

#
#-----[ AFTER, ADD ]------------------------------------------
#
<td class="{smiles.ROW_CLASS}"><div class="gensmall" align="center"><a href="{smiles.U_SMILEY_MOVE_UP}">{L_MOVE_UP}</a><br /><a href="{smiles.U_SMILEY_MOVE_DOWN}">{L_MOVE_DOWN}</a></div></td>

#
#-----[ FIND ]------------------------------------------
#
<td class="catBottom" colspan="5" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="add" value="{L_SMILEY_ADD}" class="mainoption" />&nbsp;&nbsp;<input class="liteoption" type="submit" name="import_pack" value="{L_IMPORT_PACK}">&nbsp;&nbsp;<input class="liteoption" type="submit" name="export_pack" value="{L_EXPORT_PACK}"></td>

#
#-----[ IN-LINE FIND ]------------------------------------------
#
5

#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
6

#
#-----[ FIND ]------------------------------------------
#
</table></form>

#
#-----[ AFTER, ADD ]------------------------------------------
#
<form method="post" action="{S_POSITION_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr><th class="thTop" colspan="2">{L_SMILEY_CONFIG}</th></tr>
<tr><td class="row1">{L_POSITION_NEW_SMILIES}</td><td class="row2">{POSITION_SELECT}</td></tr>
<tr><td class="catBottom" align="center" colspan="2">{S_HIDDEN_FIELDS}<input type="submit" name="change" value="{L_SMILEY_CHANGE_POSITION}" class="mainoption" /></td></tr>
</table></form>


#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php

#
#-----[ FIND ]------------------------------------------
#
ORDER BY smilies_id";

#
#-----[ REPLACE WITH ]------------------------------------------
#
ORDER BY smilies_order";

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php

#
#-----[ FIND ]------------------------------------------
#
$lang['Click_return_smileadmin']

#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['position_new_smilies'] = 'Should new smilies be added before or after existing smilies?';
$lang['smiley_change_position'] = 'Change Insert Location';
$lang['before'] = 'Before';
$lang['after'] = 'After';

#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php

#
#-----[ FIND ]------------------------------------------
#
// Debug Level

#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Smilies Order
define('TOP_LIST', -1);
define('BOTTOM_LIST', 1);


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Grüße Mario
Wer gegen eine geringe Gebühr (höhe der Gebühr bestimmst du selbst!!) ein phpBB installiert oder Mods eingebaut haben möchte sollte sich melden unter: netcom_service@gmx.net - Bisherige Aufträge 68.071
Auf Anfrage führe ich auch Reparaturen/Updates und Serverumzüge durch oder baue Mods!
Kane
Mitglied
Beiträge: 122
Registriert: 28.08.2004 10:27
Kontaktdaten:

Beitrag von Kane »

danke jedenfalls mal ;)
mfg
Kane
Jebbel
Mitglied
Beiträge: 17
Registriert: 19.02.2005 13:56

Beitrag von Jebbel »

schreib doch mal ob der funktioniert, wäre interessant :)
Kane
Mitglied
Beiträge: 122
Registriert: 28.08.2004 10:27
Kontaktdaten:

Beitrag von Kane »

also er funktioniert sehr gut ;)
mfg
Kane
Antworten

Zurück zu „phpBB 2.0: Administration, Benutzung und Betrieb“