Keyword

Forced author id during element creation

  • François
  • François's Avatar Topic Author
  • Offline
  • New Member
More
10 years 1 week ago #132298 by François
Forced author id during element creation was created by François
Hi,

I created a blog to one specific member and I would like that all members can create a new element on this blog.

I using group access to allow creation. That it's OK.

But I need to forced the id author to this specific member to group all new elements in the blog of this specific member.

Can you say me how can I forced the id of the author when the element is created ?

Thanks
François

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 1 week ago #132299 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Forced author id during element creation
Hello Francois,

You cannot force the author but you can change the author from the item's form.
You can also use the Joomla! user as an author and specify an author alias (with no link) for your contributing authors.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • François
  • François's Avatar Topic Author
  • Offline
  • New Member
More
10 years 1 week ago #132300 by François
Replied by François on topic Re: Forced author id during element creation
Tanks Krikor,

I saw that I can change author and alias on the rigth part.

But I disabled this part for all member to be sur that robots change parameters. So I need to use only one Gauthier To ne sure that all items are displayed in the same blog.

Id post in form during item creation must be declared in php file.

Do you know this file? And hop changed it ?

Tanks
François

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 5 days ago #132301 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Forced author id during element creation
You can try hardcoding the values in the input fields in the itemform.php 's override.
This will force the author for all the users however.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • François
  • François's Avatar Topic Author
  • Offline
  • New Member
More
10 years 2 days ago #132302 by François
Replied by François on topic Re: Forced author id during element creation
Hi again,

I override itemform.php but it don't work.

I override this part :
<tr>
											<td align="right" class="key">
												<?php echo JText::_('K2_AUTHOR'); ?>
											</td>
											<td id="k2AuthorOptions">
												<span id="k2Author"><?php echo $this->row->author; ?></span>
												<?php if($this->mainframe->isAdmin() || ($this->mainframe->isSite() && $this->permissions->get('editAll'))): ?>
												<a class="modal" rel="{handler:'iframe', size: {x: 800, y: 460}}" href="index.php?option=com_k2&amp;view=users&amp;task=element&amp;tmpl=component"><?php echo JText::_('K2_CHANGE'); ?></a>
												<input type="hidden" name="created_by" value="Administrateur" />
												<?php endif; ?> 
											</td>
										</tr>

By this one :
<tr>
											<td align="right" class="key">
												<?php echo JText::_('K2_AUTHOR'); ?>
											</td>
											<td id="k2AuthorOptions">
<span id="k2Author"><?php echo 'Administrateur'?></span>												
<!--<span id="k2Author"><?php echo 
$this->row->author; ?></span>
												 <?php if($this->mainframe->isAdmin() || ($this->mainframe->isSite() && $this->permissions->get('editAll'))): ?>
												<a class="modal" rel="{handler:'iframe', size: {x: 800, y: 460}}" href="index.php?option=com_k2&amp;view=users&amp;task=element&amp;tmpl=component"><?php echo JText::_('K2_CHANGE'); ?></a>
												<input type="hidden" name="created_by" value="Administrateur" />
												<?php endif; ?> -->
											</td>
										</tr>

Author change in the page but not data registration.

I found a JS function (jSelectUser) in ké.js. Is this function define the author ?

Thanks

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 1 day ago #132303 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Forced author id during element creation
Not really, but you can add a custom script to add the author once the page loads.
You can also hide it with position absolute and clip so user's can't see it.

You will have to remove the HTML comments of course.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum