Topic als website?
Forumregels
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.

- marian0810
- Berichten: 1974
- Lid geworden op: 09 apr 2007, 10:24
- Locatie: Hoofddorp
- Contacteer:
Topic als website?
Modificatie & Versie: nvt
Directe link naar de modificatie: nvt
Adres van je forum: http://www.atkinsforum.info/forum
phpBB versie: 2.0.22
Heb je onlangs een andere modificatie of stijl geïnstalleerd? nvt
Wat is het probleem? Ik zou graag een topic op het forum als website in een profiel willen kunnen invullen. Alleen, dan wordt de link te lang en rukt de layout uit zijn verband. Is er een manier om een verkorte link zoals bv. /viewtopic.php?t=2517 als - aanklikbare! - website in te stellen?
Directe link naar de modificatie: nvt
Adres van je forum: http://www.atkinsforum.info/forum
phpBB versie: 2.0.22
Heb je onlangs een andere modificatie of stijl geïnstalleerd? nvt
Wat is het probleem? Ik zou graag een topic op het forum als website in een profiel willen kunnen invullen. Alleen, dan wordt de link te lang en rukt de layout uit zijn verband. Is er een manier om een verkorte link zoals bv. /viewtopic.php?t=2517 als - aanklikbare! - website in te stellen?
Re: Topic als website?
Probeer het is met de url.
[ url=hier de link]klik hier[ /url]
Rode gedeeltes zelf in vullen.
[ url=hier de link]klik hier[ /url]
Rode gedeeltes zelf in vullen.
ForumHulp.nl kan u helpen met: Technisch onderhoud, Extensies installaties/aanpassingen en Webdesign.
Teammember op
Re: Topic als website?
Ik snap het niet totaal, maar misschien dat wat ik heb gemaakt toch helpt.
Dit vervangt als het goed is alles wat voor viewtopic.php staat, maar dan moet je de functie wel even in includes/functions.php zetten en de url aanroepen met
.
Code: Selecteer alles
function shorten_url($url)
{
global $board_config;
$server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://';
$server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name']));
$server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : '';
$script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path']));
$script_name = ($script_name == '') ? $script_name : '/' . $script_name;
$url = str_replace($server_protocol . $server_name . $server_port . $script_name . '/', '', $url);
return $url;
}
shorten_url(url);

- marian0810
- Berichten: 1974
- Lid geworden op: 09 apr 2007, 10:24
- Locatie: Hoofddorp
- Contacteer:
Re: Topic als website?
In beide gevallen blijft het website-veld in het profiel gewoon leeg 

Re: Topic als website?
En als je de functie bewerkt naar deze?Ik hoop dat het werkt.
Code: Selecteer alles
function shorten_url($old_url)
{
global $board_config;
$server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://';
$server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name']));
$server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : '';
$script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path']));
$script_name = ($script_name == '') ? $script_name : '/' . $script_name;
$url = str_replace($server_protocol . $server_name . $server_port . $script_name . '/', '', $old_url);
return '<a href="' . $old_url . '">' . $url . '</a>';
}
- marian0810
- Berichten: 1974
- Lid geworden op: 09 apr 2007, 10:24
- Locatie: Hoofddorp
- Contacteer:
Re: Topic als website?
Ook niet. Het lijkt er op dat alles wat je in dat veld invult genegeerd wordt, tenzij het met http begint 

Re: Topic als website?
Klopt 
Open

Open
includes/functions_validate.php
Code: Selecteer alles
// Search & Destroy (Zoek en verwijder)
if ($website != "")
{
if (!preg_match('#^http[s]?:\/\/#i', $website))
{
$website = 'http://' . $website;
}
if (!preg_match('#^http[s]?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $website))
{
$website = '';
}
}
Wijziging: /* en */ eromheen zetten is beter want dan kun je het nog ongedaan maken 

- marian0810
- Berichten: 1974
- Lid geworden op: 09 apr 2007, 10:24
- Locatie: Hoofddorp
- Contacteer:
Re: Topic als website?
Ha! Dat was het dus
Nu kan ik gewoon "viewtopic.php?p=468" invullen in een profiel en pakt hij de link meteen goed. Dankjewel!!

- FreakyBlue
- Berichten: 1607
- Lid geworden op: 29 okt 2007, 22:15
- Locatie: Netherlands
- Contacteer:
Re: Topic als website?
Beetje late reactie van mijn zijde en misschien begrijp ik het niet helemaal, maar wat was er mis met
: [ url=hier de link]klik hier[ /url] ... ik heb dit geprobeerd en het werkt uitstekend!!! Moet je alleen wel die overbodige spaties weghalen in de bb-codes
: [ url=hier de link]klik hier[ /url] ... ik heb dit geprobeerd en het werkt uitstekend!!! Moet je alleen wel die overbodige spaties weghalen in de bb-codes

My music and tutorials -> https://youtube.com/gh0stwrit3rMusic/
Former phpBB Style and Mod Author -> https://www.phpbb.com/customise/db/auth ... tributions
Former phpBB Style and Mod Author -> https://www.phpbb.com/customise/db/auth ... tributions
- marian0810
- Berichten: 1974
- Lid geworden op: 09 apr 2007, 10:24
- Locatie: Hoofddorp
- Contacteer:
Re: Topic als website?
Had ik al geprobeerd maar dat werkte ook niet in een profiel.
- FreakyBlue
- Berichten: 1607
- Lid geworden op: 29 okt 2007, 22:15
- Locatie: Netherlands
- Contacteer:
Re: Topic als website?
Dan moet je deze stappen uitvoeren en dan werkt het wel in je profiel ... kijk maar op http://www.traktorwereld.nl/forum/profi ... ofile&u=43, daar staan de linkjes in het profiel aangemaakt met de hieronder staande stappen. Kost een halfuurtje (kan niet met easymod), maar het werkt wel.
De volledige mod staat hier: http://phpbbhacks.com/download/193
Code: Selecteer alles
#########################################################################################
##
## Hack Title: Text field instead of input field
## Author: Acid
##
## Description: If you want to have a text field that supports bbcode, html and smilees
## instead of an input field..
## If you want to have several text fields duplicate the following
## steps and change "info" (be aware of the spelling).
## The field "info" is just an example.
##
## Files to edit: 5
## admin/admin_users.php
## includes/usercp_register.php
## includes/usercp_viewprofile.php
## templates/xxx/admin/user_edit_body.tpl
## templates/xxx/profile_add_body.tpl
##
#########################################################################################
##
## Installation/Author Notes:
## First always backup the files/database that you're going to edit.
##
## This hacks adds two new columns to the 'user' table.
##
#########################################################################################
#
#-----[ SQL ]-------------------------------------------
#
# You have to execute the following queries via phpmyadmin (change prefix)..
# If you haven´t already added a new field..
ALTER TABLE phpbb_users ADD user_info TEXT AFTER user_interests;
ALTER TABLE phpbb_users ADD user_info_bbcode_uid VARCHAR (255) AFTER user_info;
# If you want to change an existing field..
ALTER TABLE phpbb_users CHANGE user_info user_info TEXT;
ALTER TABLE phpbb_users ADD user_info_bbcode_uid VARCHAR (255) AFTER user_info;
# If you´re going to add/change several fields duplicate the above queries and
# change the field names "user_info".
#
#########################################################################################
#
#-----[ OPEN ]------------------------------------------
#
# includes/usercp_viewprofile.php
#
#-----[ FIND ]---------------------------------------------------
#
$page_title = $lang['Viewing_profile'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
#
#-----[ BELOW ADD ]---------------------------------------------------
#
include_once($phpbb_root_path . 'includes/bbcode.'.$phpEx);
$info = ( $profiledata['user_info'] != '' ) ? $profiledata['user_info'] : '';
$info_bbcode_uid = $profiledata['user_info_bbcode_uid'];
if( !$board_config['allow_html'] )
{
if( $info != '' && $userdata['user_allowhtml'] )
{
$info = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $info);
}
}
if( $board_config['allow_bbcode'] )
{
if( $info != '' && $info_bbcode_uid != '' )
{
$info = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($info, $info_bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $info);
}
}
if( $board_config['allow_smilies'] )
{
if ( $profiledata['user_allowsmile'] && $info != '' )
{
$info = smilies_pass($info);
}
}
$info = str_replace("\n", "\n<br />\n", $info);
$info = make_clickable($info);
#
#-----[ FIND ]---------------------------------------------------
#
'INFO' => ( $profiledata['user_info'] ) ? $profiledata['user_info'] : ' ',
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
'INFO' => $info,
#
#-----[ OPEN ]------------------------------------------
#
# includes/usercp_register.php
#
#-----[ FIND ]---------------------------------------------------
#
$strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests');
#
#-----[ IN-LINE FIND and DELETE ]---------------------------------------------------
#
, 'info' => 'info'
#
#-----[ FIND ]---------------------------------------------------
#
$trim_var_list = array('cur_password' => 'cur_password', 'new_password' => 'new_password', 'password_confirm' => 'password_confirm', 'signature' => 'signature');
#
#-----[ IN-LINE FIND ]---------------------------------------------------
#
, 'signature' => 'signature'
#
#-----[ AFTER ADD ]---------------------------------------------------
#
, 'info' => 'info'
#
#-----[ FIND ]---------------------------------------------------
#
$signature = prepare_message($signature, $allowhtml, $allowbbcode, $allowsmilies, $signature_bbcode_uid);
}
#
#-----[ BELOW ADD ]---------------------------------------------------
#
if ( $info != '' )
{
if ( $info_bbcode_uid == '' )
{
$info_bbcode_uid = ( $allowbbcode ) ? make_bbcode_uid() : '';
}
$info = prepare_message($info, $allowhtml, $allowbbcode, $allowsmilies, $info_bbcode_uid);
}
#
#-----[ FIND (just a quote) ]---------------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
#
#-----[ IN-LINE FIND ]---------------------------------------------------
#
, user_info = '" . str_replace("\'", "''", $info) . "'
#
#-----[ AFTER ADD ]---------------------------------------------------
#
, user_info_bbcode_uid = '$info_bbcode_uid'
#
#-----[ FIND (just a quote) ]---------------------------------------------------
#
$sql = "INSERT INTO " . USERS_TABLE . "
#
#-----[ IN-LINE FIND ]---------------------------------------------------
#
, user_info
#
#-----[ AFTER ADD ]---------------------------------------------------
#
, user_info_bbcode_uid
#
#-----[ IN-LINE FIND ]---------------------------------------------------
#
, '" . str_replace("\'", "''", $info) . "'
#
#-----[ AFTER ADD ]---------------------------------------------------
#
, '$info_bbcode_uid'
#
#-----[ FIND ]---------------------------------------------------
#
$info = $userdata['user_info'];
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
$info_bbcode_uid = $userdata['user_info_bbcode_uid'];
$info = ( $info_bbcode_uid != '' ) ? preg_replace("/:(([a-z0-9]+:)?)$info_bbcode_uid\]/si", ']', $userdata['user_info']) : $userdata['user_info'];
#
#-----[ FIND ]---------------------------------------------------
#
'INFO' => $info,
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
'INFO' => str_replace('<br />', "\n", $info),
#
#-----[ OPEN ]------------------------------------------
#
# admin/admin_users.php
#
#-----[ FIND ]---------------------------------------------------
#
$info = ( !empty($HTTP_POST_VARS['info']) ) ? trim(strip_tags( $HTTP_POST_VARS['info'] ) ) : '';
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
$info = ( !empty($HTTP_POST_VARS['info']) ) ? trim(str_replace('<br />', "\n", $HTTP_POST_VARS['info'] ) ) : '';
#
#-----[ FIND ]---------------------------------------------------
#
//
// Avatar stuff
//
#
#-----[ ABOVE ADD ]---------------------------------------------------
#
if( $info != "" )
{
if ( $info_bbcode_uid == '' )
{
$info_bbcode_uid = ( $allowbbcode ) ? make_bbcode_uid() : '';
}
$info = prepare_message($info, $allowhtml, $allowbbcode, $allowsmilies, $info_bbcode_uid);
}
#
#-----[ FIND (just a quote) ]---------------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
#
#-----[ IN-LINE FIND ]---------------------------------------------------
#
, user_info = '" . str_replace("\'", "''", $info) . "'
#
#-----[ AFTER ADD ]---------------------------------------------------
#
, user_info_bbcode_uid = '$info_bbcode_uid'
#
#-----[ FIND ]---------------------------------------------------
#
$info = htmlspecialchars($this_userdata['user_info']);
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
$info = ($this_userdata['user_info_bbcode_uid'] != '') ? preg_replace('#:' . $this_userdata['user_info_bbcode_uid'] . '#si', '', $this_userdata['user_info']) : $this_userdata['user_info'];
$info = preg_replace($html_entities_match, $html_entities_replace, $info);
#
#-----[ FIND ]---------------------------------------------------
#
'INFO' => $info,
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
'INFO' => str_replace('<br />', "\n", $info),
#
#-----[ OPEN ]------------------------------------------
#
# templates/xxx/admin/user_edit_body.tpl
# templates/xxx/profile_add_body.tpl
#
#-----[ FIND ]---------------------------------------------------
#
<td class="row2"> <input class="post" type="text" name="info" size="35" maxlength="50" value="{INFO}" /> /td>
#
#-----[ REPLACE WITH ]---------------------------------------------------
#
<td class="row2"><textarea name="info" style="width: 300px" rows="6" cols="30" class="post">{INFO}</textarea></td>
#########################################################################################
#########################################################################################
#########################################################################################
My music and tutorials -> https://youtube.com/gh0stwrit3rMusic/
Former phpBB Style and Mod Author -> https://www.phpbb.com/customise/db/auth ... tributions
Former phpBB Style and Mod Author -> https://www.phpbb.com/customise/db/auth ... tributions
- marian0810
- Berichten: 1974
- Lid geworden op: 09 apr 2007, 10:24
- Locatie: Hoofddorp
- Contacteer:
Re: Topic als website?
Dankje, misschien komt het nog eens van pas
Maar eigenlijk was mijn probleem al opgelost.
