Request: Mandatory Author's category
- SadlyMistaken
- Jr. Bludit
- Posts: 2
- Joined: Mon Aug 26, 2019 8:49 pm
Hello everybody!!
My authors (users that only want to focus on write write write....) are lazy. They don't want to choose a category, they only want to write and "maybe" to choose tags...
nahh... that is a joke... they always choose a category hahaha
I would like to have an url as categories url... but named with the alias name of the author for example, and then to list the short link cards of their articles.. o maybe i want something like:
http://www.mywebsite.dot/author/author_name/ and then, magic!
The only way i can imagine and manage to do this in that moment is:
- I created a category with the name of the author...
- I created a navigator link in my sidebar with the categories urls...
- I asked to every author to choose their respective category in their articles...
so... my authors are Categories... Anne..is able to see her links cards in mysite.com/category/anne
But her articles haven't own category... "Recipes" "Technician" etc...so... TAGS... ( )
BUT! maybe it would be easier if in the users table, the administrator could see 2 things.
- A sticky square with label "Mandatory Category" (YES/NO... boolean...whatever)
- A input text to write THAT new category or.. a dropdown to choose the category (better option in my opinion)
and the result of this could be that they would see an inactive dropdown in the category section when they are writting their content.. because It would be the correct one, always... and then only write tags... I don't know..
but... i rather prefer the MAGIC option, muchly
hahahaha... Ok, what do you think? tell me please, if that is an absurd idea don't hesitate to tell me too....
Thanks!!! (And apologize my bad english... sorry... i only want to be read for more people in the forum ) Bye!
My authors (users that only want to focus on write write write....) are lazy. They don't want to choose a category, they only want to write and "maybe" to choose tags...
nahh... that is a joke... they always choose a category hahaha
I would like to have an url as categories url... but named with the alias name of the author for example, and then to list the short link cards of their articles.. o maybe i want something like:
http://www.mywebsite.dot/author/author_name/ and then, magic!
The only way i can imagine and manage to do this in that moment is:
- I created a category with the name of the author...
- I created a navigator link in my sidebar with the categories urls...
- I asked to every author to choose their respective category in their articles...
so... my authors are Categories... Anne..is able to see her links cards in mysite.com/category/anne
But her articles haven't own category... "Recipes" "Technician" etc...so... TAGS... ( )
BUT! maybe it would be easier if in the users table, the administrator could see 2 things.
- A sticky square with label "Mandatory Category" (YES/NO... boolean...whatever)
- A input text to write THAT new category or.. a dropdown to choose the category (better option in my opinion)
and the result of this could be that they would see an inactive dropdown in the category section when they are writting their content.. because It would be the correct one, always... and then only write tags... I don't know..
but... i rather prefer the MAGIC option, muchly
hahahaha... Ok, what do you think? tell me please, if that is an absurd idea don't hesitate to tell me too....
Thanks!!! (And apologize my bad english... sorry... i only want to be read for more people in the forum ) Bye!
Fascinado con Bludit
- SadlyMistaken
- Jr. Bludit
- Posts: 2
- Joined: Mon Aug 26, 2019 8:49 pm
Fascinado con Bludit
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
You can use the following to get the username, nickname etc.:
$page->username()
and
$page->user('username')
$page->user('nickname')
$page->user('firstName')
$page->user('lastName')
Together with if conditions in the template home.php you can create author pages for example.
$page->username()
and
$page->user('username')
$page->user('nickname')
$page->user('firstName')
$page->user('lastName')
Together with if conditions in the template home.php you can create author pages for example.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Hi, I am working on some customization of the page's theme and I can not get the first name of the logged user.
So if I am a logged user I'd like to see my "firstName" displayed on the screen.
I tried this $login->user('firstName'); but it does not work.
How to get the FirstName of the logged user?
So if I am a logged user I'd like to see my "firstName" displayed on the screen.
I tried this $login->user('firstName'); but it does not work.
How to get the FirstName of the logged user?
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
Diego, the developer, answered me, that you have to to create the $login in the frontend to get the username of the logged in user:
Code: Select all
$login = new Login();
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Ok, I've made it!
Code: Select all
$login = new Login();
$myLoggedUser = $login->username();
$myLoggedUserObject = new User($myLoggedUser);
$myLoggedUserFirstName = $myLoggedUserObject->firstName($myLoggedUser);