Solved

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

Posted on 2010-09-14
43
504 Views
Last Modified: 2013-11-19
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
Comment
Question by:TheCommander
  • 22
  • 15
  • 3
  • +3
43 Comments
 
LVL 51

Expert Comment

by:HainKurt
ID: 33674418
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
 
LVL 51

Expert Comment

by:HainKurt
ID: 33674424
which version of joomla are you using?
0
 

Author Comment

by:TheCommander
ID: 33674646
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
 
LVL 11

Expert Comment

by:Amanda Watson
ID: 33676248
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
 
LVL 51

Expert Comment

by:HainKurt
ID: 33676692
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
 

Author Comment

by:TheCommander
ID: 33680132
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
 
LVL 3

Expert Comment

by:Toretto
ID: 33680220
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
 

Author Comment

by:TheCommander
ID: 33680357
Hi Toretto - did not work I'm afraid :-(
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 33681194
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
 

Author Comment

by:TheCommander
ID: 33681266
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
 

Author Comment

by:TheCommander
ID: 33681271
Your welcome to FTP details if you ike Kurt
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 33682821
you can send FTP detail to hkahraman at yahoo dot com
0
 

Author Comment

by:TheCommander
ID: 33683047
will do
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 33684110
cannot login...
0
 
LVL 7

Expert Comment

by:Vimal DM
ID: 33684629
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
 
LVL 51

Expert Comment

by:HainKurt
ID: 33684774
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
 
LVL 51

Expert Comment

by:HainKurt
ID: 33684810
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
 
LVL 51

Expert Comment

by:HainKurt
ID: 33684873
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
 
LVL 51

Expert Comment

by:HainKurt
ID: 33684895
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
 
LVL 51

Expert Comment

by:HainKurt
ID: 33685039
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
 
LVL 51

Expert Comment

by:HainKurt
ID: 33685095
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:TheCommander
ID: 33689693
Did everything you suggested but problem persists :-(
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 33691161
did you revert the changes back?
0
 

Author Comment

by:TheCommander
ID: 33691190
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
 
LVL 51

Expert Comment

by:HainKurt
ID: 33691203
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
 
LVL 24

Expert Comment

by:lenamtl
ID: 33691347
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
 

Author Comment

by:TheCommander
ID: 33691362
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
 
LVL 24

Expert Comment

by:lenamtl
ID: 33691368
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
 

Author Comment

by:TheCommander
ID: 33691418
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
 
LVL 51

Expert Comment

by:HainKurt
ID: 33691468
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
 
LVL 51

Expert Comment

by:HainKurt
ID: 33691485
is there anyway to send me the admin login/pw...
0
 

Author Comment

by:TheCommander
ID: 33691522
Ill send to your email address you gave me
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 33692321
looks like it is coming from a content plug-in, but I could not locate yet...
0
 
LVL 24

Expert Comment

by:lenamtl
ID: 33692371
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
 
LVL 51

Expert Comment

by:HainKurt
ID: 33692521
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
 

Author Comment

by:TheCommander
ID: 33692623
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
 
LVL 51

Expert Comment

by:HainKurt
ID: 33692975
ok, got it ;)

it is acesef system plug in...
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 33693002
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
 
LVL 51

Accepted Solution

by:
HainKurt earned 500 total points
ID: 33693016
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
 

Author Comment

by:TheCommander
ID: 33693032
Huseyin - you rock!!! Nice one - your dilligence is much appreciated!
0
 

Author Closing Comment

by:TheCommander
ID: 33693042
Excellent!
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 33693154
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
 

Author Comment

by:TheCommander
ID: 33693254
looks fine to me mate - Im not even that pushed to use that plugin so its all good :-)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to count occurrences of each item in an array.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now