Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 525
  • Last Modified:

How do I remove the number "1" that appears at the top left of every article on my Joomla site

How do I remove the number "1" that appears at the top left of every article on my Joomla site. I dont recall it being there before but now it is and I dont know how to get rid of it. Its not in any of the articles.

see http://www.galwaycomedyfestival.com
Screen-shot-2010-09-14-at-17.42.jpg
0
TheCommander
Asked:
TheCommander
  • 22
  • 15
  • 3
  • +3
1 Solution
 
HainKurtSr. System AnalystCommented:
looks like you are using joomla core module

PATH_TO_JOOMLA/components/com_content/views/article/tmpl/default.php

maybe you need to edit this file...

look for "article-bg" in your joomla files, if there is only one file (php) post it here
we can find what is that 1 for, so maybe we can comment it out or fix the data...
	<div class="article">
    	<div class="article-bg">
                        <div class="headline">
<h1 class="title">We're In it For The Laugh</h1>
            </div>
                        
            1        
                        
            <h4>Bulmers Galway Comedy Festival 2010</h4>

Open in new window

0
 
HainKurtSr. System AnalystCommented:
which version of joomla are you using?
0
 
TheCommanderAuthor Commented:
Hi Kurt its J 1.5.20 - I'm not sure which file you want me to post - the one I'm posting now is the one you referred to
PATH_TO_JOOMLA/components/com_content/views/article/tmpl/default.php

default.php
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Amanda WatsonCommented:
I actually think this is going to be part of your template.
I had a similar thing happen to me once and when I changed templates it wasn't there...so I think it is somewhere within the template files.  Its not obvious to me where...but if you swap templates and check the article to see if its missing, then that will maybe confirm that?
0
 
HainKurtSr. System AnalystCommented:
I downloaded the joomla, and the original codes does not match with your site...
looks like you have modified the templates or using some new/modofied modules...

check your files for these wordings

<div class="article">
<div class="article-bg">

or just "article" "article-bg", and post these files...
0
 
TheCommanderAuthor Commented:
Hey Snowball77 - thanks but I tried that and the number still appears.

Having said that the file that you are looking for Kurt (at least I think this is it!) was actually in templates/yoo_intro/html/articles/default.php. I have attached it so please let me know if this is the one you were looking for - thanks for your help guys!

Paul
default.php
0
 
TorettoCommented:
I think that I found the mysterious "1" in your default.php.  

Try the file I attached, it should fix the problem.  back-up the old default.php just in case ;-)
default.php
0
 
TheCommanderAuthor Commented:
Hi Toretto - did not work I'm afraid :-(
0
 
HainKurtSr. System AnalystCommented:
Toretto, where did you get this file? I have downloaded joomla 1.5.2 and could not find any file containing "article-bg", but the one you posted has article-bg in it... but your file does not have any h4 tag...

your file has

<h1 class="pagetitle">
  <?php echo $this->escape($this->params->get('page_title')); ?>
</h1>

but the page contains

<h1 class="title">
                        We're In it For The Laugh
</h1>

note the class is different, looks like TheCommander is using a different version... or modified version... please post the link that you downloaded the joomla. which version are you using exactly?
0
 
TheCommanderAuthor Commented:
Hi Kurt,
The version of Joomla I am using is 1.5.20.

That second file I posted (which Toretto had a look at - see file attached to my post at 01:29am)

I found it in

templates/yoo_intro/html/articles/default.php

- so its in the template folder - I could not find  any reference to article-bg in the file you suggested...


0
 
TheCommanderAuthor Commented:
Your welcome to FTP details if you ike Kurt
0
 
HainKurtSr. System AnalystCommented:
you can send FTP detail to hkahraman at yahoo dot com
0
 
TheCommanderAuthor Commented:
will do
0
 
HainKurtSr. System AnalystCommented:
cannot login...
0
 
Vimal DMCommented:
Hai,

This may it be coming from your,article components or with your template,

where you would have made by mistake added some text some where,

check the modified pages


Thanks.
0
 
HainKurtSr. System AnalystCommented:
ok, this is the file responsible for this

and here is the code

~\templates\yoo_intro\html\com_content\article\default.php

<?php echo $this->article->event->beforeDisplayContent; ?>

I will comment out this... and it will fix...
I also renamed the original as default.php.org (in case you need it)
0
 
HainKurtSr. System AnalystCommented:
ok, the commented one uses this

C:\Temp\TheCommander\components\com_content\views\article\view.html.php

$results = $dispatcher->trigger('onBeforeDisplayContent', array (&$article, &$params, $limitstart));
$article->event->beforeDisplayContent = trim(implode("\n", $results));

I dont what is this doing ;)

0
 
HainKurtSr. System AnalystCommented:
looks like in the content module there is some setting like

show this before content : ....

and I guess someone, or you put "1" here ;) to test or just for fun...

the commented part disabled this feature... so it is fixed now, but we remevoed a feature ;)

if you can find that part in article module settings, you can use the original file... you may want to display something before content of each article, maybe a seperator, an image, a link to archieve folders etc...
0
 
HainKurtSr. System AnalystCommented:
what I suggest is, go to admin settings, edit configuration for article module
find the part "display before content" setting, clear it (it should contain "1" now)
and use the original file...
0
 
HainKurtSr. System AnalystCommented:
if there is no such setting, go to article Manager, parameters
here there are some parameters which you can turn it on/off...
maybe one of them is responsible for that 1, but it is coming from site settings I guess...
0
 
HainKurtSr. System AnalystCommented:
or edit the article, on right there should be parameters, check these, maybe you will see "1" somewhere

some parameters here

Author
Author Alias
0
 
TheCommanderAuthor Commented:
Did everything you suggested but problem persists :-(
0
 
HainKurtSr. System AnalystCommented:
did you revert the changes back?
0
 
TheCommanderAuthor Commented:
no - (I had a look around but I dont think I changed anything) - I left files the way you had them. ie. the original default.php still has .org at the end of it...
0
 
HainKurtSr. System AnalystCommented:
I commented out the line 164

<!--<?php echo $this->article->event->beforeDisplayContent; ?>-->

now 1 does not show... why did you put this one back?
0
 
lenamtlCommented:
Hi,

First try another Joomla template to see if the 1 is still there.
This will help to know if it's come from the template or from bot/text editor

Do you use specific bot (gadget) with your article?

Which text editor do you use and which plugin?

Did you edit the template and/or CSS or this is the original files?





0
 
TheCommanderAuthor Commented:
Sorry I may have done it by accident - I was testing because I could still see the number after commenting and I can still see the number 1 now... even though the line is commented out.  

The one you commented is templates/yoo_intro/html/com_content/article/default.php - right?

Does this file have anything to do with it? components/com_content/article/tmpl/default.php
0
 
lenamtlCommented:
And if you have edited template and css did you do that with Dreamweaver or text editor.
Dreamweaver add a lot of unwanted code in files...
0
 
TheCommanderAuthor Commented:
Hi lenamtl - no Dreamweaver just css edit. I have only edited styles throughout - I don't know php so I would not mess with any of that really.  I have swapped templates but the problem persists.

I dont understand these questions

Do you use specific bot (gadget) with your article?

Which text editor do you use and which plugin?

Do you mean which WYSIWYG editor/plugin I use - its JCE editor...
0
 
HainKurtSr. System AnalystCommented:
lenamtl, it is coming from

~\templates\yoo_intro\html\com_content\article\default.php

<?php echo $this->article->event->beforeDisplayContent; ?>

and this function is here

~\components\com_content\views\article\view.html.php

$results = $dispatcher->trigger('onBeforeDisplayContent', array (&$article, &$params, $limitstart));
$article->event->beforeDisplayContent = trim(implode("\n", $results));

and I guess 'onBeforeDisplayContent' is here

~\administrator\components\com_acesef\plugin\acesef.php

function onBeforeDisplayContent(& $article, & $params, $limitstart)      {
  if(strlen($this->acesef_config->download_id) == 32){
    global $mainframe;
...
    return '';
  }
}
0
 
HainKurtSr. System AnalystCommented:
is there anyway to send me the admin login/pw...
0
 
TheCommanderAuthor Commented:
Ill send to your email address you gave me
0
 
HainKurtSr. System AnalystCommented:
looks like it is coming from a content plug-in, but I could not locate yet...
0
 
lenamtlCommented:
This is why I'm asking him if he use any bot in his text editor..
So that why it is a good idea to test another template to see if it is related to the template or text editor...
0
 
HainKurtSr. System AnalystCommented:
i tested all templates ;) same result...
I disabled all plugins one by one... same result...

this one is producing that 1

~\templates\yoo_intro\html\com_content\article\default.php

<?php echo $this->article->event->beforeDisplayContent; ?>

and remember, I tried all templates (4 of them, all shows 1)
looks like a hidden plug in may be?
0
 
TheCommanderAuthor Commented:
how very bizarre - what if I reinstall joomla in a new directory and copy the site to that - see if it goes... or is it something to do with the newer versions of joomla
0
 
HainKurtSr. System AnalystCommented:
ok, got it ;)

it is acesef system plug in...
0
 
HainKurtSr. System AnalystCommented:
here is the file

~\plugins\system\acesef.php

	function onBeforeDisplayContent(& $article, & $params, $limitstart)	{
		if(strlen($this->acesef_config->download_id) == 32){
			global $mainframe;
			
			// Is backend
			if($mainframe->isAdmin()){
				return '';
			}

			// Joomla SEF is disabled
			$config =& JFactory::getConfig();
			if(!$config->getValue('sef')){
				return '';
			}

			// Check if AceSEF is enabled
			if($this->acesef_config->mode == 0){
				return '';
			}
			
			// Set h1 tag
			if($this->acesef_config->seo_h1 == 1){
				$article->title = '{h1}'.'---'.$article->title.'---'.'{/h1}';
			}

			return '';
		}
	}

Open in new window

0
 
HainKurtSr. System AnalystCommented:
this function is called and and it was returning true (I modified them to return '')

here is the original function...

	function onBeforeDisplayContent(& $article, & $params, $limitstart)	{
		if(strlen($this->acesef_config->download_id) == 32){
			global $mainframe;
			
			// Is backend
			if($mainframe->isAdmin()){
				return true;
			}

			// Joomla SEF is disabled
			$config =& JFactory::getConfig();
			if(!$config->getValue('sef')){
				return true;
			}

			// Check if AceSEF is enabled
			if($this->acesef_config->mode == 0){
				return true;
			}
			
			// Set h1 tag
			if($this->acesef_config->seo_h1 == 1){
				$article->title = '{h1}'.$article->title.'{/h1}';
			}

			return '';
		}
	}

Open in new window

0
 
TheCommanderAuthor Commented:
Huseyin - you rock!!! Nice one - your dilligence is much appreciated!
0
 
TheCommanderAuthor Commented:
Excellent!
0
 
HainKurtSr. System AnalystCommented:
thank you ;) maybe it is a bug... if you reinstall, make those changes in this plug in...

just I could not understand this function, sometimes it was returning true (boolean), sometimes '', does not make any sense to me... maybe you should ask to developers of this plugin...
when it returns true, it is converted to 1 and put on top of content of article... I hope we did not break anything with this chage ;)
0
 
TheCommanderAuthor Commented:
looks fine to me mate - Im not even that pushed to use that plugin so its all good :-)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 22
  • 15
  • 3
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now