how add extra line above Title

GK User
Sun Oct 21, 2012 12:46 pm
hi,
I need to add extra a line above ""Title" . Its not for every article; this option need only when necessary. ie if i need to add 2nd line for any news then how i can add that.
i attach a image for what i need.
Image link is http://clip2net.com/s/2pXwT
My site link is http://arthosuchak.com/

Please help me to solve my problem.
User avatar
Junior Boarder

teitbite
Sun Oct 21, 2012 4:07 pm
Hi

I can see You are trying to make this extra line of text in NSP module. Unfortunately NSP is taking informations difectly from articles, which means that in order to display it article system needs to be recoded to make a possibility to store this new information.

I think the easiest way to achieve that would be to add a new module with custom HTML code and move it to display in this location, but this is a solution You will have to control with any article change.
User avatar
Moderator

GK User
Sun Oct 21, 2012 4:58 pm
teitbite wrote:Hi

I can see You are trying to make this extra line of text in NSP module. Unfortunately NSP is taking informations difectly from articles, which means that in order to display it article system needs to be recoded to make a possibility to store this new information.

I think the easiest way to achieve that would be to add a new module with custom HTML code and move it to display in this location, but this is a solution You will have to control with any article change.



Thank you very much teitbite for quick responce.
Im trying to solve your advice. Lat's see how its working!!!
User avatar
Junior Boarder

teitbite
Sun Oct 21, 2012 6:00 pm
Hi

The crusial part will be to add a module class suffix to the custom HTML module, so You will be able move only this module into the right place.
User avatar
Moderator

GK User
Mon Oct 22, 2012 7:24 am
teitbite wrote:Hi

The crusial part will be to add a module class suffix to the custom HTML module, so You will be able move only this module into the right place.



Im try with my way but fail :? :? :? could you help me a little bit more ...

Thanks for everything...
User avatar
Junior Boarder

teitbite
Tue Oct 23, 2012 1:10 am
Hi

Sure. Please send me an access to Your site. I'll make one for example.
User avatar
Moderator

GK User
Tue Oct 23, 2012 3:04 pm
hi,
Already sent you a mail.

thanks
User avatar
Junior Boarder

teitbite
Tue Oct 23, 2012 8:22 pm
Hi

Done. It's a litle bit complicated, but unfortunately I do not see a solution which will not involve hacking the module code.

I've created a new custom module and gave it a title "Breaking news" also a module class suffix "_breaking_news", than publish it in a top1 positions where we want this text to be visible.

Last step is to check the class name of a module we need this new text to add to and knowing this we can come up with a css code ( override.css )

Code: Select all
#gkToptop1 {
position: relative;
}

#nsp-nsp_157 {
margin-top: 35px;
}

.box_breaking_news h3 {
position: absolute;
z-index: 100;
top: 45px;
left: 12px;
}
User avatar
Moderator

GK User
Wed Oct 24, 2012 4:41 am
hi teitbite,

Thank you very much. At last i've got a solution. its working...
User avatar
Junior Boarder

teitbite
Wed Oct 24, 2012 4:49 pm
Hi

Unfortunately not the easiest one :( But it got me thinking if not to recode gkModuleTitleLink plugin to support such subtitles. This would work even better, unfortunately this is beyond our support.
User avatar
Moderator

GK User
Mon Nov 12, 2012 7:09 pm
teitbite wrote:Hi

Unfortunately not the easiest one :( But it got me thinking if not to recode gkModuleTitleLink plugin to support such subtitles. This would work even better, unfortunately this is beyond our support.


Yess... its very difficult to maintain this way for two lines title. can you please just advise just which file/where i can get a solve.
specially if you can suggest me exact which which file/code i need to edit for this.
im using here most of k2 article. i need two line title for both intro and details section. here one of my friend suggest me to replace 46/49 line of template/html/com_k2/default/category_item.php file with this code:
Code: Select all
<?php
//separate subtitle
if( strpos( $this->item->title, '||' ) === FALSE)
{
$title = $this->item->title;

}else{
$titles = explode('||', $this->item->title);
$headline = $titles[0];
$title = $titles[1];
}

// Creates span around first word of title for unique styling
if (isset($headline))
{
$title = '<span class="headline">' . $headline . '</span>' . $title;
}
echo $title;
?>


im trying it also but not working though he said that he used this code and worked for him.

I need to solve it.
User avatar
Junior Boarder

teitbite
Tue Nov 13, 2012 1:01 pm
Hi

Sorry but I do not understand now. The code You've mentioned is to be used in article layout and what You were asking first is for a module title. 2 totally different things. Please make it clear and than I'll try.
User avatar
Moderator

GK User
Tue Nov 13, 2012 3:48 pm
teitbite wrote:Hi

Sorry but I do not understand now. The code You've mentioned is to be used in article layout and what You were asking first is for a module title. 2 totally different things. Please make it clear and than I'll try.


hi,
thanks for everything. basically i need 2 line article title that might show both in the article and module also.
User avatar
Junior Boarder

teitbite
Wed Nov 14, 2012 11:07 am
Hi

Ok. So the method mentioned by Your friend will work, but it will require changes to

- /html/com_k2/default/category_item.php
- /html/com_k2/default/item.php
- /html/com_k2/default/tag.php
- /html/com_k2/generic.php
- /html/mod_news_pro_gk4/layout.parts.php (this one needs to be copied from /modules directory)

I think it's all. I do not see any other extensions displaying the header.
User avatar
Moderator


cron