Link to us modual with bbcode & direct link

User avatar
Austeyr
Topic author
Active Member
Active Member
Posts: 5
Joined: 26. June 2016 17:05
phpBB.com User: Austeyr
Location: Australia

Link to us modual with bbcode & direct link

Post by Austeyr » 17. December 2016 15:58

hi im wondering how we can edit or if someone could create a better link to us.

currently it only shows a HTML copy and paste

Link to Us

Code: Select all

<a href= "http://www.board3.de/">www.board3.de/</a>
I'd really like people to have the option to copy & paste a direct link , html & BBcode share links.


Example

Code: Select all

http://www.board3.de/

<a href= "http://www.board3.de/">www.board3.de</a>

[url=http://www.board3.de/]www.board3.de[/url]

Someone has done it, here's there website --> http://reyno41.bplaced.net/phpbb/portal

If you take a look at their link to us module on there portal you will see they have the bbcode just no direct link. I really like this module with these features. people are more inclined to share my forum in other forums or use my forums direct link in a twitter post or something, html in kinda useless.

thanks in advance guys.
:arrow: Oxaus Notice: Consider checking out & Registering at Oxaus.com Community forum.

My Favourite Quote
The only thing necessary for the triumph of evil is for good men to do nothing.~Edmund Burke

Image

User avatar
Kirk
Portal Professional
Portal Professional
Posts: 1358
Joined: 27. July 2010 18:02
phpBB.de User: Kirk

Re: Link to us modual with bbcode & direct link

Post by Kirk » 18. December 2016 19:29

Hi
I made it on my side like this:
Open: root/ext/board3/portal/modules/link_us.php
Find:

Code: Select all

			'U_LINK_US'			=> '<a&nbsp;href="' . $u_link . '"&nbsp;' . (($this->config['site_desc']) ? 'title="' . $this->config['site_desc'] . '"' : '' ) . '>' . (($this->config['sitename']) ? $this->config['sitename'] : $u_link ) . '</a>',
Replace with:

Code: Select all

			'U_LINK_US_HTML'    => '<a&nbsp;href="' . $u_link . '"&nbsp;' . (($this->config['site_desc']) ? 'title="' . $this->config['site_desc'] . '"' : '' ) . '>' . (($this->config['sitename']) ? $this->config['sitename'] : $u_link ) . '</a>',
			'U_LINK_US_BB'        => '[url=' . $u_link . ']' . (($this->config['sitename']) ? $this->config['sitename'] : $u_link ) . '[/url]',
Open: root/ext/board3/portal/styles/prosilver/template/portal/modules/link_us_side.html
Find:

Code: Select all

	<input type="text" tabindex="9" value="{U_LINK_US}" class="inputbox autowidth" onclick="this.focus();this.select();" readonly="readonly" /><br />
Replace with:

Code: Select all

		Direct Link:<br />
			<input type="text" tabindex="9" value="{BOARD_URL}" class="inputbox autowidth" onclick="this.focus();this.select();" readonly="readonly" /><br /><br />
		HTML:<br />
			<input type="text" tabindex="9" value="{U_LINK_US_HTML}" class="inputbox autowidth" onclick="this.focus();this.select();" readonly="readonly" /><br /><br />
		BBCode:<br />
			<input type="text" tabindex="9" value="{U_LINK_US_BB}" class="inputbox autowidth" onclick="this.focus();this.select();" readonly="readonly" /><br />
Open: root/ext/board3/portal/language/en/modules/portal_link_us_module.php
Find:

Code: Select all

'LINK_US_TXT'	=> 'Please feel free to link to <strong>%s</strong>. Use the following HTML:',
Replace with:

Code: Select all

'LINK_US_TXT'    => 'Please feel free to link to <strong>%s</strong>. Use the following codes:',
Note: Please note for the saving in the portal_link_us_module.php that in phpBB3 etc. the language files in a special format, UTF-8 without BOM stored.

In the end "ACP -> General" --> purge cache
Gruß Udo

User avatar
Austeyr
Topic author
Active Member
Active Member
Posts: 5
Joined: 26. June 2016 17:05
phpBB.com User: Austeyr
Location: Australia

Re: Link to us modual with bbcode & direct link

Post by Austeyr » 19. December 2016 14:38

Thanks heaps, it's done the trick but a question im using prosilver_flat and it seems to end up looking like this picture below.

Image


Anyway to fix that ?

Cheers heaps for your help. thats just what i was after.
:arrow: Oxaus Notice: Consider checking out & Registering at Oxaus.com Community forum.

My Favourite Quote
The only thing necessary for the triumph of evil is for good men to do nothing.~Edmund Burke

Image

User avatar
Kirk
Portal Professional
Portal Professional
Posts: 1358
Joined: 27. July 2010 18:02
phpBB.de User: Kirk

Re: Link to us modual with bbcode & direct link

Post by Kirk » 19. December 2016 18:43

I do not have the problem with this style.
Gruß Udo

User avatar
Austeyr
Topic author
Active Member
Active Member
Posts: 5
Joined: 26. June 2016 17:05
phpBB.com User: Austeyr
Location: Australia

Re: Link to us modual with bbcode & direct link

Post by Austeyr » 20. December 2016 02:17

it looks like it was my fault i removed a bit of code i was not meant to remove i have fixed it now and all is working. your instructions where perfect i just didn't follow them right.

All working fine now thanks so much for your help..


Working Example!

Image
Last edited by Austeyr on 22. December 2016 14:35, edited 1 time in total.
:arrow: Oxaus Notice: Consider checking out & Registering at Oxaus.com Community forum.

My Favourite Quote
The only thing necessary for the triumph of evil is for good men to do nothing.~Edmund Burke

Image

User avatar
Austeyr
Topic author
Active Member
Active Member
Posts: 5
Joined: 26. June 2016 17:05
phpBB.com User: Austeyr
Location: Australia

Re: Link to us modual with bbcode & direct link

Post by Austeyr » 22. December 2016 01:03

UPDATE: codes below now show, Direct link , HTML Link , BBCode Link , HTML Banner , BBCode Banner. Enjoy.

I'm pretty sure im posting in the wrong place, this post is no longer a request my question was already solved. I do however have another edit for this post that could add some benefit to other members searching for the link to us module and edits for it to add advanced features.

So in order to help and keep this one post in one place and not scattered over the forum, i'll just continue posting to this thread. Im sorry if this was the wrong thing to do.

Basically this post will help you add a image to your link to us board3 portal module, the other day someone kindly showed me how to add bbcode, html & a direct link to the link to us module (^Read above posts in this thread if you want to know how to do that^). I then went away thinking what else could someone use to share my website, If i don't give people options they wont bother and i'm only limiting my likelihood of being shared having one type of code to be shared, im also limiting where people share my site, hence bbcode for forums, direct link for twitter, facebook, g+ html for blog posts & websites. Well what about banner images, people might want to share a html banner image in a blog post or on a website page, ( i'll eventually add a bbcode banner as well so they can share the banner image in a forum) UPDATED: Codes Below now Include BBCode Banner For Forums.

Thanks @KIRK for showing me how to do this by the way.


Here is the code.

Open: root/ext/board3/portal/modules/link_us.php

Find:

Code: Select all

    'U_LINK_US'         => '<a&nbsp;href="' . $u_link . '"&nbsp;' . (($this->config['site_desc']) ? 'title="' . $this->config['site_desc'] . '"' : '' ) . '>' . (($this->config['sitename']) ? $this->config['sitename'] : $u_link ) . '</a>',
Replace with:

Code: Select all

'U_LINK_US_HTML'    => '<a&nbsp;href="' . $u_link . '"&nbsp;' . (($this->config['site_desc']) ? 'title="' . $this->config['site_desc'] . '"' : '' ) . '>' . (($this->config['sitename']) ? $this->config['sitename'] : $u_link ) . '</a>',
         'U_LINK_US_BB'        => '[url=' . $u_link . ']' . (($this->config['sitename']) ? $this->config['sitename'] : $u_link ) . '[/url]',
         'U_LINK_US_BAN'        => '<a&nbsp;href="' . $u_link . '">' . '<img&nbsp;src="' . 'http://YOUR-WEBSITE.com/forum/images/YOUR-IMAGE.png">' . '</a>',
'U_LINK_US_BANBBCO'        => '[url=' . $u_link . ']' . '[img]' . 'http://YOUR-WEBSITE.com/forum/images/YOUR-IMAGE.png[/img]' . '[/url]',
NOTICE: Change , http://YOUR-WEBSITE.com/forum/images/YOUR-IMAGE.png to the image banner you want to use id stick with a button style banner 160 x 160 is nice.

Open: root/ext/board3/portal/styles/prosilver/template/portal/modules/link_us_side.html

Find:

Code: Select all

<input type="text" tabindex="9" value="{U_LINK_US}" class="inputbox autowidth" onclick="this.focus();this.select();" readonly="readonly" /><br />
Replace with:

Code: Select all

{LINK_US_TXT}
<p>Share the love and link to us using the below codes.</p>
	 Direct Link:<br />
         <input type="text" tabindex="9" value="{BOARD_URL}" class="inputbox autowidth" onclick="this.focus();this.select();" readonly="readonly" /><br /><br />
      HTML Link:<br />
         <input type="text" tabindex="9" value="{U_LINK_US_HTML}" class="inputbox autowidth" onclick="this.focus();this.select();" readonly="readonly" /><br /><br />
      BBCode Link:<br />
         <input type="text" tabindex="9" value="{U_LINK_US_BB}" class="inputbox autowidth" onclick="this.focus();this.select();" readonly="readonly" /><br /><br/>
HTML Banner:<br/>
<input type="text" tabindex="9" value="{U_LINK_US_BAN}" class="inputbox autowidth" onclick="this.focus();this.select();" readonly="readonly" /><br /><br/>
BBCode Banner:<br/>
<input type="text" tabindex="9" value="{U_LINK_US_BANBBCO}" class="inputbox autowidth" onclick="this.focus();this.select();" readonly="readonly" /><br />
Banner Demo:
<img src= "http://YOUR-WEBSITE.com/forum/images/YOUR-IMAGE.png" width= "160"/>
NOTICE: Change http://YOUR-WEBSITE.com/forum/images/YOUR-IMAGE.png To The banner image you used.

Go to "ACP -> General" --> purge cache

View my website to see demo. it shows exactly as it will on your site using codes above.

If you don't want to visit my site to see a demo thats cool here's a picture of what it will look like.

Image
:arrow: Oxaus Notice: Consider checking out & Registering at Oxaus.com Community forum.

My Favourite Quote
The only thing necessary for the triumph of evil is for good men to do nothing.~Edmund Burke

Image

Return to “Modification Requests”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests