Link Block (IM Portal) -> Advanced Links anpassen [erledi

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
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.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Benutzeravatar
QO
Mitglied
Beiträge: 304
Registriert: 21.02.2006 12:59
Kontaktdaten:

Link Block (IM Portal) -> Advanced Links anpassen [erledi

Beitrag von QO »

Servus

Ich komme mit dem learning-by-doing nichtmehr weiter. Jedenfalls dürfte es für euch kein Problem sein.

Ich verwende IM Portal und Advanced Link Mod. Daher will ich den Link Block an den Advanced Link mod anpassen, damit diese daten verwendet werden.

L-IMAGE ist durch die anpassung zu einem Link zu einem Bild geworden (Banner....). Original wäre es ein Bild im imageordner. Leider zeigt es keine Bilder an, d.h. ich schätzte mal es hohlt sich nicht das Bild vom url.


Original code

Code: Alles auswählen

....
<a href="{link.L_URL}" onMouseOver="scroll_minibanners.stop()" onMouseOut="scroll_minibanners.start()" target ="_blank"><img src="{link.L_IMAGE}" alt="{link.L_NAME}" title="{link.L_NAME}" border="0" vspace="3"></a><br />
....


So wie ich es ändern wollte (übertragen vom Advanced Link mod)

Code: Alles auswählen

.....
<a href="{link.L_URL}" onMouseOver="scroll_minibanners.stop()" onMouseOut="scroll_minibanners.start()" target ="_blank"><img src= "{L_IMAGE}" alt="{link.L_NAME}" width= 60 height=30 border="0" vspace="3"></a><br />
....
Was hab ich da falsch?


Danke i.V.

QO
Benutzeravatar
QO
Mitglied
Beiträge: 304
Registriert: 21.02.2006 12:59
Kontaktdaten:

Beitrag von QO »

Hier mal kurz die änderungen für diejenigen, die es auch den Link Block von IM Portal ans Advanced Link mod anpassen wollen.

Mods:

Advanced Link Mod

IM Portal

IM Portal Links Block

Die Installationsanleitung für den Link Block lautet jetzt:

Nicht durchführen = Rot
Neu = Grün




##############################################################
## MOD Title: links on IM Portal
## MOD Author: KVFB97 < info@kvfb97.co.uk >
## MOD Description: Inserts a new block with scrolling minibanners on IM Portal which stops when
## the cursor rolls over the image
Advanced Link Mod notwendig

## MOD Version: 1.0.2
##
## Installation Level: Easy
## Installation Time: 1 Minutes
## Files To Edit: 2
## includes/constants.php
## language/lang_english/lang_admin.php
##
## Included Files: 10
## admin/admin_links.php
## blocks/blocks_imp_links.php
## images/links/icon_fast.gif
## images/links/icon_slow.gif
## images/links/icon_stop.gif
## images/links/icon_up.gif
images/links/kvfb.gif
## images/links/phpbb.gif
## templates/admin/admin_links_add.tpl
## templates/admin/admin_links_display.tpl

## templates/blocks/links_block.tpl
## links_db_update.php
##
##############################################################
## Author Notes:
##
## SQL
## ---
## Instead entering the given SQL-Statement, you can upload the file linksblock_db_update.php
## to your phpbb root directory and run this with your browser.
## This file will do all nessassary changes in the database for you.
## After using this file, please delete it to avoid errors.
##
## Upload image
## ------------
## Before inserting a new link, upload the neccassary mini-banner (button) as gif-file
## (recommended 88x31 pixel) into the folder images/linksblock/. Then just insert a link title,
## the filename of the image and the url to insert the link.
##
##############################################################
## MOD History:
##
## 2004-06-15 - Version 1.0.2
## - Cleaned up some of the code
## - Now when you roll over the images, they stop
##
## 2004-05-30 - Version 1.0.1
## - Cleaned up some of the code
##
## 2004-05-30 - Version 1.0.0
## - First release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ SQL ]------------------------------------------
#
CREATE TABLE phpbb_links (
id mediumint(8) unsigned NOT NULL auto_increment,
url text NOT NULL,
name text NOT NULL,
image text NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM;

INSERT INTO phpbb_links (url, name, image) VALUES ('http://www.phpbb.com', 'phpBB', 'images/links/phpBB.gif');
INSERT INTO phpbb_links (url, name, image) VALUES ('http://www.kvfb97.co.uk', 'KVFB97.co.uk', 'images/links/kvfb.gif');

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

#
#-----[ FIND ]------------------------------------------
#
define('GROUPS_TABLE', $table_prefix.'groups');

#
#-----[ AFTER, ADD ]------------------------------------------
#
define('links', $table_prefix.'links');
define('link', $table_prefix.'links');
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php

#
#-----[ FIND ]------------------------------------------
#
?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['L_delete'] = 'Link <b>%s</b> successfull deleted';
$lang['L_update'] = 'Link <b>%s</b> successfull updated';
$lang['L_insert'] = 'Link <b>%s</b> successfull inserted';
$lang['L_title'] = 'Subject';
$lang['L_url'] = 'URL';
$lang['L_version'] = 'Version';
$lang['L_description'] = 'Description';
$lang['L_name'] = 'Name';
$lang['L_require'] = 'Required';
$lang['L_link'] = 'Link';
$lang['L_yes'] = 'Yes';
$lang['L_no'] = 'No';
$lang['L_status'] = 'Status ';

#
#-----[ OPEN ]------------------------------------------
#
blocks/blocks_imp_links.php

#
#-----[ Find ]------------------------------------------
#

$sql = "SELECT * FROM " . LINKS . " ORDER BY name";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query Link', '', __LINE__, __FILE__, $sql);
}

while ($row = $db->sql_fetchrow($result))
{
$template->assign_block_vars('link', array(
'L_NAME' => $row['links_name'],
'L_URL' => $row['link_url'],
'L_IMAGE' => $row['links_image'])
);
}


#
#-----[ Replace with ]------------------------------------------
#

$sql = "SELECT * FROM " . link . " ORDER BY links_name";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query Link', '', __LINE__, __FILE__, $sql);
}

while ($row = $db->sql_fetchrow($result))
{
$template->assign_block_vars('link', array(
'L_NAME' => $row['links_name'],
'L_URL' => $row['link_url'],
'L_IMAGE' => $row['link_logo_src'])
);
}
#
#-----[ OPEN ]------------------------------------------
#

templates/blocks/links_block.tpl
#
#-----[ Find]------------------------------------------
#
<a href="{link.L_URL}" onMouseOver="scroll_minibanners.stop()" onMouseOut="scroll_minibanners.start()" target ="_blank"><img src="{link.L_IMAGE}" alt="{link.L_NAME}" title="{link.L_NAME}" border="0" vspace="3"></a><br />

#
#-----[ Replace with]------------------------------------------
#
<a href="{link.L_URL}" onMouseOver="scroll_minibanners.stop()" onMouseOut="scroll_minibanners.start()" target ="_blank"><img src= "{link.L_IMAGE}", alt="{link.L_NAME}" width=100 height= 20 border="0" vspace="3"></a><br />

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM




Damit müsste der Block dann automatisch die Links vom Advanced Link mod sich aus der DB hohlen, daher sind die ACP-funktionen nichtmehr gebrauchbar.

Viel spaß ;)
Antworten

Zurück zu „phpBB 2.0: Mod Support“