Where can I change the Parameter Control defaults?

Need help with the Administration of your Joomla! site? Pop your questions in here.
Locked
User avatar
maxa
Joomla! Guru
Joomla! Guru
Posts: 557
Joined: Sat Aug 27, 2005 11:07 am
Location: Sweden
Contact:

Where can I change the Parameter Control defaults?

Post by maxa » Wed Dec 28, 2005 11:17 am

Hi,

I want to change the defaults of the Parameter Control (New content item), since those cannot be altered by Frontpage publishers.
Where can I do that?

(To be precise, I want to change the "Intro text: Show" to "Hide" by default.)

Thanks!
Last edited by maxa on Wed Dec 28, 2005 11:46 am, edited 1 time in total.

User avatar
CubaLibre
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 209
Joined: Thu Aug 18, 2005 4:08 pm
Location: Austria
Contact:

Re: Where can I change the Parameter Control defaults?

Post by CubaLibre » Wed Dec 28, 2005 4:57 pm

Look at line 28-31 in administrator/components/com_content/content.xml:

Code: Select all

<param name="introtext" type="radio" default="1" label="Intro Text" description="Show/Hide the intro text">
      <option value="0">Hide</option>
      <option value="1">Show</option>
  </param>
HTH,
Kurt
Kurt Banfi

http://www.clockbit.com <- Developer of Contacts XTD
http://www.open-sef.org <- Chief Designer ;)

User avatar
maxa
Joomla! Guru
Joomla! Guru
Posts: 557
Joined: Sat Aug 27, 2005 11:07 am
Location: Sweden
Contact:

Re: Where can I change the Parameter Control defaults?

Post by maxa » Wed Dec 28, 2005 6:26 pm

Thank you Kurt, but that only helped halfway...
I'm sorry that I did not express myself more clear. I need this option to be off also with items created from frontpage and published via frontpage. Your fix only affects items created in the backend...

So, I hope there is a similar setting for the frontpage editor somewhere...?
Last edited by maxa on Wed Dec 28, 2005 8:16 pm, edited 1 time in total.

User avatar
maxa
Joomla! Guru
Joomla! Guru
Posts: 557
Joined: Sat Aug 27, 2005 11:07 am
Location: Sweden
Contact:

Re: Where can I change the Parameter Control defaults?

Post by maxa » Thu Dec 29, 2005 3:38 pm

I tried to change row 1157 in /components/com_content/content.php :

Code: Select all

$params->def( 'introtext',                          1 );
but than the Intro dissapears totally even from the Blog page or Frontpage.

I really can't have the intro on the content pages, and I really need this to be default for items created from frontend. I'm sure you guys that knows the core can help me out here.

derekf
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sat Mar 11, 2006 4:07 pm

Re: Where can I change the Parameter Control defaults?

Post by derekf » Sun Mar 12, 2006 2:23 pm

I've just tried making the changes to the content.xml file as suggested by Kurt, however this appears to simply have the effect of 'reversing' the function of the show/hide buttons for the introtext  ???

Does anybody know how I can change the default (for backend content entry) from show to hide?

Regards,

Derek...

User avatar
Adam Eterno
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 120
Joined: Fri Aug 19, 2005 11:20 pm
Location: Ireland

Re: Where can I change the Parameter Control defaults?

Post by Adam Eterno » Thu Sep 21, 2006 10:07 am

Hi Derek,

Just wondering if you ever achieved this? I have the exact same requirment.

Many thank.

User avatar
maxa
Joomla! Guru
Joomla! Guru
Posts: 557
Joined: Sat Aug 27, 2005 11:07 am
Location: Sweden
Contact:

Re: Where can I change the Parameter Control defaults?

Post by maxa » Thu Sep 21, 2006 10:19 am

No, I did not. But I still need it :)

User avatar
phlux0r
Joomla! Guru
Joomla! Guru
Posts: 812
Joined: Thu Feb 09, 2006 1:41 am
Location: Auckland, NZ
Contact:

Re: Where can I change the Parameter Control defaults?

Post by phlux0r » Thu Sep 21, 2006 11:11 am

derekf wrote: I've just tried making the changes to the content.xml file as suggested by Kurt, however this appears to simply have the effect of 'reversing' the function of the show/hide buttons for the introtext  ???

Does anybody know how I can change the default (for backend content entry) from show to hide?

Regards,

Derek...
In the segment:

Code: Select all

<param name="introtext" type="radio" default="1" label="Intro Text" description="Show/Hide the intro text">
      <option value="0">Hide</option>
      <option value="1">Show</option>
  </param>
change the value from default="1" to: default="0". That way the default will be "Hide" for that parameter.

User avatar
maxa
Joomla! Guru
Joomla! Guru
Posts: 557
Joined: Sat Aug 27, 2005 11:07 am
Location: Sweden
Contact:

Re: Where can I change the Parameter Control defaults?

Post by maxa » Thu Sep 21, 2006 11:16 am

phlux0r wrote: change the value from default="1" to: default="0". That way the default will be "Hide" for that parameter.
Yes, but that only helps for backend. My request concerned frontend publishers.

User avatar
phlux0r
Joomla! Guru
Joomla! Guru
Posts: 812
Joined: Thu Feb 09, 2006 1:41 am
Location: Auckland, NZ
Contact:

Re: Where can I change the Parameter Control defaults?

Post by phlux0r » Thu Sep 21, 2006 11:30 am

maxa wrote: No, I did not. But I still need it :)
I had a quick look at this (I don't pretend to be a core expert :)) but I saw by looking into the jos_content table that items created from the front-end don't get ANY of the paramters set. So I guess the solution is to do a hack and copy the bit of code from the administrator com_content component that sets the parameters in the backend to the front-end saveContent() function.

HTH

EDIT:
Yes, but that only helps for backend. My request concerned frontend publishers.
Yeah, I know, I was just replying to derekf's post. In the meantime I was curious about your problem and looked at it, see note above :).
Last edited by phlux0r on Thu Sep 21, 2006 11:37 am, edited 1 time in total.

wvdirks
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Aug 31, 2005 9:03 am

Re: Where can I change the Parameter Control defaults?

Post by wvdirks » Fri Oct 20, 2006 12:15 am

After hours of searching I managed to set the default by adding the following bit of code after line 2017 (before $row->version++;)

Code: Select all

//set default all new articles to hide introtext
if ($row->version==0) {
	$row->attribs = "introtext=0\n";
}
First it checks if the article is new then sets the "introtext=0" attribute of the content item.

Hope this helps  :-\

Would be nice if introtext show/hide were added to Joomla's global parameters so that it would apply to frontend AND backend.

carlodamo
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Tue Apr 10, 2007 1:05 pm

Re: Where can I change the Parameter Control defaults?

Post by carlodamo » Wed Jan 02, 2008 3:45 pm

wvdirks wrote: After hours of searching I managed to set the default by adding the following bit of code after line 2017 (before $row->version++;)

Code: Select all

//set default all new articles to hide introtext
if ($row->version==0) {
	$row->attribs = "introtext=0\n";
}
First it checks if the article is new then sets the "introtext=0" attribute of the content item.

Hope this helps  :-\

Would be nice if introtext show/hide were added to Joomla's global parameters so that it would apply to frontend AND backend.
It seem to run well - SOLVED!!!!

Only some notes:
1. the file to modify is this: components/com_content/content.php
2. I am using Joomla 1.0.13, the line is 2041

thanks and have a nice 2008!!!!


Locked

Return to “Administration - 1.0.x”