WWW button on viewtopic was removed (solved)

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Scam Warning
Locked
User avatar
Linda Carter
Registered User
Posts: 514
Joined: Fri Feb 15, 2008 6:45 am

WWW button on viewtopic was removed (solved)

Post by Linda Carter »

At first I thought I wasn't seeing things clearly, but it seems the phpBB developers have missed the fact the WWW button is not being showed on the subSilver2 style. :cry:

If you insert anything on that field (your website), on phpBB 2 you will see that picture:

Image

On the viewtopic. And if you click on the WWW button, you will be redirected to another page (link opening on a new window).

Now, back to phpBB 3: only the proSilver style have that icon, and it's not opening on a new window. Which doesn't make any sense.

Image

Any idea how we should proceed to: :)

1) Force the proSilver URL icon (see picture above) to open the website-link from the user profile on another window?

2) Force the subSilver 2 style (from phpBB 3) to have that icon being showed on the viewtopic?

I know there is a way to create a new icon to be placed on user profiles, but this one is already there, so this is not a request for a new field on user CP and icon on viewtopic.

EDIT: OK, I see their point. All that personal information was "hidden" from viewtopic and now it's only located on the viewprofile. But I still need to know if there's a way to do one (or both) of these things. At least the first.
Last edited by Linda Carter on Fri Sep 05, 2008 2:56 pm, edited 1 time in total.
"Whoever has not known himself has known nothing. But whoever has known himself has simultaneously achieved knowledge about the depth of all things."
User avatar
TheIlluminative
Former Team Member
Posts: 2451
Joined: Thu Jun 26, 2003 11:34 pm
Location: Egypt
Name: Mahmoud
Contact:

Re: WWW button on viewtopic was removed from the subSilver style

Post by TheIlluminative »

1- Open file: styles/prosilver/template/viewtopic_body.html, find:

Code: Select all

<a href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}">
replace with:

Code: Select all

<a href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}" target="_blank">
2- Open file: styles/subsilver2/template/viewtopic_body.html, find:

Code: Select all

<div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF postrow.U_PROFILE --><a href="{postrow.U_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_PM --><a href="{postrow.U_PM}">{PM_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_EMAIL --><a href="{postrow.U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF -->&nbsp;</div>
replace with:

Code: Select all

<div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF postrow.U_PROFILE --><a href="{postrow.U_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_PM --><a href="{postrow.U_PM}">{PM_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_EMAIL --><a href="{postrow.U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_WWW --><a href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}">{WWW_IMG}</a><!-- ENDIF -->&nbsp;</div>
refresh your templates then through ACP.
User avatar
Linda Carter
Registered User
Posts: 514
Joined: Fri Feb 15, 2008 6:45 am

Re: WWW button on viewtopic was removed from the subSilver style

Post by Linda Carter »

I have corrected your post, now I can have both the WWW button and the ability to open links on another window! :)

This is the correct syntax: :)

<a target="_blank" href="
TheIlluminative (post corrected) wrote:1- Open file: styles/prosilver/template/viewtopic_body.html, find:

Code: Select all

<a href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}">
replace with:

Code: Select all

<a target="_blank" href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}" target="_blank">
2- Open file: styles/subsilver2/template/viewtopic_body.html, find:

Code: Select all

<div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF postrow.U_PROFILE --><a href="{postrow.U_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_PM --><a href="{postrow.U_PM}">{PM_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_EMAIL --><a href="{postrow.U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF -->&nbsp;</div>
replace with:

Code: Select all

<div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF postrow.U_PROFILE --><a href="{postrow.U_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_PM --><a href="{postrow.U_PM}">{PM_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_EMAIL --><a href="{postrow.U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_WWW --><a target="_blank" href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}">{WWW_IMG}</a><!-- ENDIF -->&nbsp;</div>
refresh your templates then through ACP.
"Whoever has not known himself has known nothing. But whoever has known himself has simultaneously achieved knowledge about the depth of all things."
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10551
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: WWW button on viewtopic was removed from the subSilver style

Post by Noxwizard »

Linda Carter wrote:I have corrected your post, now I can have both the WWW button and the ability to open links on another window! :)

This is the correct syntax: :)

<a target="_blank" href="
TheIlluminative (post corrected) wrote:1- Open file: styles/prosilver/template/viewtopic_body.html, find:

Code: Select all

<a href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}">
replace with:

Code: Select all

<a target="_blank" href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}" target="_blank">
Actually, what you've done is you've invalidated that code with a second target. First, there is no proper order in the HTML attributes. The original code was fine having it at the end. Second, the target attribute itself is invalid for XHTML, which is what subsilver2 validates as.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Re: WWW button on viewtopic was removed from the subSilver style

Post by drathbun »

Linda Carter wrote:I have corrected your post, now I can have both the WWW button and the ability to open links on another window! :)

This is the correct syntax: :)

<a target="_blank" href="
The "target" attribute does not have to appear in any particular place in order to be functional, therefore the code posted by TheIlluminative was absolutely fine. In fact, your "correction" was wrong in that you included the target="_blank" twice.

This works just fine:

Code: Select all

<a href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}" target="_blank">
As does this:

Code: Select all

<a href="{postrow.U_WWW}" target="_blank" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}">
Or even

Code: Select all

<a target="_blank" href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}">
I have written a short test page that demonstrates that all three of these work.

Your "correction" was this:

Code: Select all

<a target="_blank" href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}" target="_blank">
While it might work, the extra copy of the target attribute is redundant.

As an aside, you have made more than one post on this board in a rather confrontational manner. Instead of:
it seems the phpBB developers have missed the fact the WWW button is not being showed on the subSilver2 style
you could have simply stated that the button was missing and asked how to fix it. Also you stated
...and it's not opening on a new window. Which doesn't make any sense.
If you had read the phpBB Discussion forum you would have found a number of topics (including this one) that have already dealt with this. The decision of not opening a new window was made to adhere to standards, not personal opinions.

Normally I would not have called attention to the manner of your posting, but you have shown a certain pattern which has brought your posts to the attention of the moderator team on more than one occasion. Please keep this in mind for future posts. Attacking or denigrating the developers does not earn you points on this site from those that put out their free time to write the code and maintain this site, nor does it earn you points from those of us that are fans of the work that is being done.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image
User avatar
Linda Carter
Registered User
Posts: 514
Joined: Fri Feb 15, 2008 6:45 am

Re: WWW button on viewtopic was removed from the subSilver style

Post by Linda Carter »

Noxwizard wrote:Actually, what you've done is you've invalidated that code with a second target. First, there is no proper order in the HTML attributes. The original code was fine having it at the end. Second, the target attribute itself is invalid for XHTML, which is what subsilver2 validates as.
drathbun is correct about the proSilver style, but the subSilver2 is different. My last post have the correct syntax for that line. By adding the target attribute before the href attribute (not after), you did what was necessary to open that link on another window.

This is the correct syntax (if you are using subSilver 2):

Code: Select all

    <div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF postrow.U_PROFILE --><a href="{postrow.U_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_PM --><a href="{postrow.U_PM}">{PM_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_EMAIL --><a href="{postrow.U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_WWW --><a target="_blank" href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}">{WWW_IMG}</a><!-- ENDIF -->&nbsp;</div>
The first time I tried to use TheIluminative code, it didn't work on subSilver2. Because he missed the target attribute on his post.
Normally I would not have called attention to the manner of your posting, but you have shown a certain pattern which has brought your posts to the attention of the moderator team on more than one occasion. Please keep this in mind for future posts. Attacking or denigrating the developers does not earn you points on this site from those that put out their free time to write the code and maintain this site, nor does it earn you points from those of us that are fans of the work that is being done.
And may I assume those who spend their time using the software are not allowed to show their discontent with your so called standards that on a daily-basis will be a bad choice and mean nothing for most people?

I can't believe most phpBB users are happy with the idea of opening links in the same window (unless they don't use the URL BBcode, or find the idea of Local BBCodes interesting). Thanks, but I will stick with something that was a "standard" for 7 years on phpBB 2. The new version always manages to change the one feature you like/need most. :ugeek:

I always thought a little criticism, instead of being received as a major offense, would be used for something good. I guess I was mistaken. :oops:
"Whoever has not known himself has known nothing. But whoever has known himself has simultaneously achieved knowledge about the depth of all things."
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10551
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: WWW button on viewtopic was removed (solved)

Post by Noxwizard »

Linda Carter wrote:drathbun is correct about the proSilver style, but the subSilver2 is different. My last post have the correct syntax for that line. By adding the target attribute before the href attribute (not after), you did what was necessary to open that link on another window.
I wasn't refering to whether it actually opened in a window or not. That code is invalid, adding a second target further invalidates it.

If you check it against W3C, you get the following:
Line 2, Column 10: there is no attribute "target".

Code: Select all

<a target="_blank" href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_W
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
That is due to adding the first target.
Line 2, Column 92: duplicate specification of attribute "target".

Code: Select all

…IT_WEBSITE}: {postrow.U_WWW}" target="_blank">
You have specified an attribute more than once. Example: Using the "height" attribute twice on the same "img" tag.
That is caused by the addition of your code, the line is syntactically incorrect.
Linda Carter wrote:I always thought a little criticism, instead of being received as a major offense, would be used for something good. I guess I was mistaken.
Expressing your opinion is fine, as well as some criticism. However, constant criticism on nearly every MOD Request and style change is not constructive criticism.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Re: WWW button on viewtopic was removed from the subSilver style

Post by drathbun »

Linda Carter wrote:I can't believe most phpBB users are happy with the idea of opening links in the same window (unless they don't use the URL BBcode, or find the idea of Local BBCodes interesting). Thanks, but I will stick with something that was a "standard" for 7 years on phpBB 2. The new version always manages to change the one feature you like/need most. :ugeek:
That's the beauty of open source. You can do whatever you want with it.
I always thought a little criticism, instead of being received as a major offense, would be used for something good. I guess I was mistaken. :oops:
There are productive ways to express your opinions or ask for help. Saying "I would like to see this work in a different way" is much more likely to receive a positive response than "what on earth were the developers thinking when they wrote this code?". If you can't see the difference between those two choices then I am afraid that you're going to continue to experience negative responses here. If I can clarify this point further via PM please feel free to contact me, as I do not want to clutter up this topic any more than we already have. Thanks.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image
Locked

Return to “[3.0.x] Styles Support & Discussion”