- Posts: 214
COMMUNITY FORUM
facebook share
- George Nasis
-
Topic Author
- Offline
- Elite Member
i am trying to change something
in the preview of the facebook share, there is author`s name. how can i change that to author`s username?
thank you very much
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
The author meta tag isn't generated from K2.
This is a core Joomla! feature.
Please Log in or Create an account to join the conversation.
- George Nasis
-
Topic Author
- Offline
- Elite Member
- Posts: 214
thank you for the information!you saved me time before start to search all files!
have you any idea where i can find it in joomla core?
thank you
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Here you go.
You can then set a custom meta with this function
docs.joomla.org/JDocumentHTML/addCustomTag
Please Log in or Create an account to join the conversation.
- George Nasis
-
Topic Author
- Offline
- Elite Member
- Posts: 214
i understand that the first link is to enable the author meta
and the second to write javascript to display what i want.
But where exactly should i write this?
and how am i supposed to bring the username of the author on each page of k2 item? :/ (
thank you
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Now override the item.php file and you can build your code based on these links I sent you to display the user's username.
More on overrides can be found here:
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
Please Log in or Create an account to join the conversation.
- George Nasis
-
Topic Author
- Offline
- Elite Member
- Posts: 214
really thank you for your interest.
i am not sure if there is a misunderstanding about what i mean.
i attach an image to be more specific
http://imgur.com/plSLCqG
of course i have override too many times too many templates but how am i supposed to change the user->name to user-> username?
everything in the item.php for author is about k2 staff and not for joomla core or facebook share..
thank you
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
These tags are being generated from Joomla! not from K2.
You need to write your own script if you want to override Joomla!'s behaviour.
Also by accessing Joomla!'s user object you have access to all the (Joomla!) user's info.
Please Log in or Create an account to join the conversation.
- George Nasis
-
Topic Author
- Offline
- Elite Member
- Posts: 214
yes i imagined so.
have you any idea where exactly is there the php file of Joomla! core?
thank you
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Please Log in or Create an account to join the conversation.
- Joe Campbell
-
- Offline
- Platinum Member
- Posts: 438
I recommend using NoNumber ReReplacer to perform a Find & Replace of the author meta produced by Joomla.
Your search would look something like this...
Find:
<meta name="author" content="Old Name" />
Replace:
<meta name="author" content="New Name" />
I hope this helps,
Joe Campbell
Please Log in or Create an account to join the conversation.
- George Nasis
-
Topic Author
- Offline
- Elite Member
- Posts: 214
i read that it is not advisable to print out the author username and i think that it is right..so i preferred to hide the author meta tag throug glabal configuration.
but thanks again! :)
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Please Log in or Create an account to join the conversation.
- Joe Campbell
-
- Offline
- Platinum Member
- Posts: 438
The "new" meta author can be whatever you want it to be, such as your organization name.
Please Log in or Create an account to join the conversation.
- George Nasis
-
Topic Author
- Offline
- Elite Member
- Posts: 214
Please Log in or Create an account to join the conversation.
- Joe Campbell
-
- Offline
- Platinum Member
- Posts: 438
www.nonumber.nl/extensions/rereplacer#combining-rereplacer-and-sourcerer
Please Log in or Create an account to join the conversation.