Youtube and Google profilefields need an upgrade

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Post Reply
User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Youtube and Google profilefields need an upgrade

Post by Dragosvr92 »

In 3.1 a youtube profilefield was added in which we can insert our youtube username to link to it.... There is just one major problem though...
https://productforums.google.com/forum/#!topic/youtube/XGtGWbDErr4 wrote: A YouTube channel, strictly speaking, no longer HAS a "username" as such. Now it is the custom URL which is being referred to and not the title (the name with the space is a title). If you cannot use the bits from after com/channel/ in the channel's URL try giving your YouTube channel a custom URL in YouTube settings / Advanced.
New youtube members no longer get an username. So I think we should decide on providing different ways to access their profile.

So these are the three different ways i can access my channel by...

Custom URL: http://www.youtube.com/c/DragosValentinRădulescu
Channel URL: https://www.youtube.com/channel/UCnIICe ... ks6-uYxIYw
OldUser URL: https://www.youtube.com/user/RDWWWWWW

As we already had the user system added into 3.1, even if it was a short while... I was thinking to provide checkboxes for this profile to specify what data was inserted into the youtubefield to know how to threat it...

Edit: Also, GooglePlus has two ways of loading a profile. By ID, as it is implemented in phpbb. And there is also the custom username you can choose.

The custom username you choose is also used on youtube. If you browse to my channel, http://plus.google.com/108546038125632351646, you get redirected to the custom url. https://plus.google.com/+DragosValentinRădulescu/. It took me a while to see that my id is only placed on my username in posts i made. People are used to just copy the data from their url. Not to hunt around for the id...

Soo.. this is messed up.... (Thank you Google. Couldnt have simply added one standard method)
I will leave it on the pros to decide how to sort this out.... But i think checkboxes that specify if you enter an id or custom username would be best.
Last edited by Dragosvr92 on Sat Apr 25, 2015 2:13 am, edited 1 time in total.
Previous user: TheKiller
Avatar on Memberlist 1.0.3

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1891
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Youtube profilefield needs an upgrade

Post by DavidIQ »

Google+ looks to be a non-issue since the format of the URL is the same in either case. For YouTube however... :-?

Maybe a separate CPF for YouTube username andanother for channel name?
Image

User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: Youtube profilefield needs an upgrade

Post by Dragosvr92 »

DavidIQ wrote:Google+ looks to be a non-issue since the format of the URL is the same in either case. For YouTube however... :-?

Maybe a separate CPF for YouTube username andanother for channel name?
Yes, it is. But curently, the profile field only allows numbers. I guess this should change to also allow letters and diacritics, like ă

Naah.. That would be too much imo.... Specifying what kind of data was inserted in the field via checkboxes and threat them with the right url sounds good... But im not sure how easy it would be to code :?

Something like this...?
checkboxes.PNG
Edit: I guess it would be somekind of IF and ELSEIF Statements that generate the right type of links?

Code: Select all

<!-- IF=USER -->
https://www.youtube.com/user/$1 
<-- ELSEIF=CUSTOM -->
http://www.youtube.com/c/$1 
<-- ELSEIF=CHANNEL-->
https://www.youtube.com/channel/$1
<!-- ENDIF --> 
I know thats not the right syntaxes but something like that controlled by checkboxes...?
Previous user: TheKiller
Avatar on Memberlist 1.0.3

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: Youtube profilefield needs an upgrade

Post by MattF »

Dragosvr92 wrote:Specifying what kind of data was inserted in the field via checkboxes and threat them with the right url sounds good... But im not sure how easy it would be to code :?
That's not possible.

DavidIQ is on the mark. Just add a new CPF yourself. phpBB can add a new URL based option in the future (and possibly convert the old one to a channel).
Has an irascible disposition.

User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: Youtube and Google profilefields need an upgrade

Post by Dragosvr92 »

It doesnt make sense to have two CPF that link to the same page content.
If phpbb will indeed add a url based option in the future, what will i do with this custom profilefield and its data?

The youtube data should stay in the same field. People can just specify with a click what kind of data it is, and treat it as such.
Maybe make a php array with the url types and use the selected data.....?

Code: Select all

array(
    1 => youtube.com/user/$1,
    2 => youtube.com/channel/$1,
    3 => youtube.com/c/$1,
)
It should be easy enough for the devs to write a new function for the youtube CPF to add this feature.
It can always be reused as reference if we will be in the same situation.
Previous user: TheKiller
Avatar on Memberlist 1.0.3

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: Youtube and Google profilefields need an upgrade

Post by MattF »

Dragosvr92 wrote:It should be easy enough for the devs to write a new function for the youtube CPF to add this feature.
It can always be reused as reference if we will be in the same situation.
The CPF system is not designed to handle anything at all like what you photoshopped. The system is complex and not designed for that.
Has an irascible disposition.

User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: Youtube and Google profilefields need an upgrade

Post by Dragosvr92 »

VSE wrote:
Dragosvr92 wrote:It should be easy enough for the devs to write a new function for the youtube CPF to add this feature.
It can always be reused as reference if we will be in the same situation.
The CPF system is not designed to handle anything at all like what you photoshopped. The system is complex and not designed for that.
Yes, in its current state i was well aware it is not possible at the moment. But that doesnt mean it cant be changed.
It can just be hardcoded in the files, without adding the option to configure a cpf in the acp. Just add a new function.
It could save the proffered data inside the youtube field too i guess.... By adding the array number at the start of the user. 1_cpfdatahere
Surely its possible to stretch a new function that does this in the bbcode. Isnt there?
Previous user: TheKiller
Avatar on Memberlist 1.0.3

User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: Youtube and Google profilefields need an upgrade

Post by Dragosvr92 »

Forgot to link the ticket here: https://tracker.phpbb.com/browse/PHPBB3-13859
Previous user: TheKiller
Avatar on Memberlist 1.0.3

User avatar
javiexin
Registered User
Posts: 90
Joined: Thu Dec 22, 2011 10:04 am

Re: Youtube and Google profilefields need an upgrade

Post by javiexin »

VSE wrote:The CPF system is not designed to handle anything at all like what you photoshopped. The system is complex and not designed for that.
Have you seen my "Mutiple Selection Profile Field"? Not quite what is being asked, but in this direction...

Agreed, the system is not designed for this purpose, but it is possible. I think this could be doable with the current system, only tweaking it "a bit" (value should carry an array somehow, and also contact_url and validation). Given that these fields are VARCHAR(255) we would have to be careful as to how this is stored, to avoid problems with this, but again, quite possible in my opinion.

See, I am used to working with what is available, even if you need to stretch it a bit :lol:
-javiexin

[EDIT] I would probably consider something closer to the DropDown profile field + text input for this: you need managing multi-language descriptions / options, that are already taken into consideration in that case.

Post Reply