[SOLVED] How to remove Weblinks numbering and #display page?

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
bigblue
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Mon Jul 30, 2007 1:03 pm

[SOLVED] How to remove Weblinks numbering and #display page?

Post by bigblue » Thu Aug 28, 2008 12:08 pm

I'm using J1.5.6. How do I remove both the link numbers on the left of my links and the page display dropdown on my Weblinks page? Unfortunately there's no provision to do this in the Weblink Manager Parameters and I really don't need them showing on my site.

I've been searching through the components/com_weblinks directory but can't find which file/code needs editing/commenting out that will remove this.

Any help really appreciated!

Thx

[mod edit: add SOLVED to subject]

User avatar
dextercowley
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3286
Joined: Sun Apr 06, 2008 4:44 am
Location: Seattle, WA, USA

Re: How to remove Weblinks numbering and #display page?

Post by dextercowley » Thu Aug 28, 2008 2:08 pm

Hi. One way would be with a template override. Here is a link with basic information: http://docs.joomla.org/How_to_override_ ... omla!_core
The file you need to override is components/com_weblinks/views/category/tmpl/default_items.php.

It looks like lines 14-21 display the limit drop-down, as follows:

Code: Select all

<tr>
	<td align="right" colspan="4">
	<?php
		echo JText::_('Display Num') .'&nbsp;';
		echo $this->pagination->getLimitBox();
	?>
	</td>
</tr>
It looks like lines 24-26 display the column heading for the number column:

Code: Select all

	<td width="10" style="text-align:right;" class="sectiontableheader<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
		<?php echo JText::_('Num'); ?>
	</td>
And lines 40-42 display the row number:

Code: Select all

	<td align="right">
		<?php echo $this->pagination->getRowOffset( $item->count ); ?>
	</td>
To do this as a template override, you'll want to copy this file to the folder templates/<your template>/html/com_weblinks/category/default_items.php.

A great way to learn about template overrides is to install the joomla sample website and play with the beez template. This has overrides for this file and most other content types. Good luck. Mark
Mark Dexter
"Well...how did I get here?"

bigblue
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Mon Jul 30, 2007 1:03 pm

Re: How to remove Weblinks numbering and #display page?

Post by bigblue » Thu Aug 28, 2008 3:41 pm

Thx Mark.. that's worked perfectly.. I wasn't aware of the template overrides, so you've opened a new door for me today!

Thx again for taking the time to help me with this. :)

dlocc
Joomla! Apprentice
Joomla! Apprentice
Posts: 24
Joined: Tue Jun 17, 2008 9:04 pm

Re: How to remove Weblinks numbering and #display page?

Post by dlocc » Wed Sep 10, 2008 12:16 am

Thanks for this post, it taught me a lot! I didn't even know about these template overrides...! VERY USEFUL!!!

User avatar
builder
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Sat Sep 13, 2008 1:12 pm

Re: [SOLVED] How to remove Weblinks numbering and #display page?

Post by builder » Tue Sep 30, 2008 5:24 pm

can't get it work for rhuk_milkyway template. I went through the documentation of how to override and it says I have to create the folders. So I did

template>rhuk_milkyway>html>com_weblinks>category

and I copied the default_items.php into it nothing changed.

Any help please?

thanks... ;)

User avatar
dextercowley
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3286
Joined: Sun Apr 06, 2008 4:44 am
Location: Seattle, WA, USA

Re: [SOLVED] How to remove Weblinks numbering and #display page?

Post by dextercowley » Wed Oct 01, 2008 12:11 am

Hi. Nothing will change unless you edit the default_items.php file in the new folder. Mark
Mark Dexter
"Well...how did I get here?"

User avatar
builder
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Sat Sep 13, 2008 1:12 pm

Re: [SOLVED] How to remove Weblinks numbering and #display page?

Post by builder » Wed Oct 01, 2008 3:08 am

Still don't know how. The default_items.php I have changed also. By deleting the codes written by you above. So that don't work, how should I edit the default_items.php?

User avatar
builder
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Sat Sep 13, 2008 1:12 pm

Re: [SOLVED] How to remove Weblinks numbering and #display page?

Post by builder » Wed Oct 01, 2008 4:01 am

Here is the file: default_items.php the file is not changed yet -- in case it confused you

Code: Select all

<?php defined('_JEXEC') or die('Restricted access'); ?>
<script language="javascript" type="text/javascript">
	function tableOrdering( order, dir, task ) {
	var form = document.adminForm;

	form.filter_order.value 	= order;
	form.filter_order_Dir.value	= dir;
	document.adminForm.submit( task );
}
</script>

<form action="<?php echo JFilterOutput::ampReplace($this->action); ?>" method="post" name="adminForm">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
	<td align="right" colspan="4">
	<?php
		echo JText::_('Display Num') .'&nbsp;';
		echo $this->pagination->getLimitBox();
	?>
	</td>
</tr>
<?php if ( $this->params->def( 'show_headings', 1 ) ) : ?>
<tr>
	<td width="10" style="text-align:right;" class="sectiontableheader<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
		<?php echo JText::_('Num'); ?>
	</td>
	<td width="90%" height="20" class="sectiontableheader<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
		<?php echo JHTML::_('grid.sort',  'Web Link', 'title', $this->lists['order_Dir'], $this->lists['order'] ); ?>
	</td>
	<?php if ( $this->params->get( 'show_link_hits' ) ) : ?>

	<td width="30" height="20" class="sectiontableheader<?php echo $this->params->get( 'pageclass_sfx' ); ?>" style="text-align:center;" nowrap="nowrap">
		<?php echo JHTML::_('grid.sort',  'Hits', 'hits', $this->lists['order_Dir'], $this->lists['order'] ); ?>
	</td>
	<?php endif; ?>
</tr>
<?php endif; ?>
<?php foreach ($this->items as $item) : ?>
<tr class="sectiontableentry<?php echo $item->odd + 1; ?>">
	<td align="right">
		<?php echo $this->pagination->getRowOffset( $item->count ); ?>
	</td>
	<td height="20">
		<?php if ( $item->image ) : ?>
		&nbsp;&nbsp;<?php echo $item->image;?>&nbsp;&nbsp;
		<?php endif; ?>
		<?php echo $item->link; ?>
		<?php if ( $this->params->get( 'show_link_description' ) ) : ?>
		<br /><span class="description"><?php echo nl2br($item->description); ?></span>
		<?php endif; ?>
	</td>
	<?php if ( $this->params->get( 'show_link_hits' ) ) : ?>
	<td align="center">
		<?php echo $item->hits; ?>
	</td>
	<?php endif; ?>
</tr>
<?php endforeach; ?>
<tr>
	<td align="center" colspan="4" class="sectiontablefooter<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
	<?php echo $this->pagination->getPagesLinks(); ?>
	</td>
</tr>
<tr>
	<td colspan="4" align="right" class="pagecounter">
		<?php echo $this->pagination->getPagesCounter(); ?>
	</td>
</tr>
</table>
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="" />
</form>

User avatar
dextercowley
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3286
Joined: Sun Apr 06, 2008 4:44 am
Location: Seattle, WA, USA

Re: [SOLVED] How to remove Weblinks numbering and #display page?

Post by dextercowley » Wed Oct 01, 2008 4:08 am

Hi. The first thing you want to do is test that your modified file is really being used. I usually put in something like

Code: Select all

<?php echo 'this is a test'; ?>
just so I can verify that this file is being called. If it isn't being used, then perhaps you should double-check that you have the correct folder structure and that you are using the right template.

Hope this helps. Mark
Mark Dexter
"Well...how did I get here?"

User avatar
builder
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Sat Sep 13, 2008 1:12 pm

Re: [SOLVED] How to remove Weblinks numbering and #display page?

Post by builder » Wed Oct 01, 2008 4:30 am

ok I have to admit, I'm a beginner in web programming, What should happen? if I put the code into the default_items.php

Nothing happened, I did that. I put it in the first line.

User avatar
builder
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Sat Sep 13, 2008 1:12 pm

Re: [SOLVED] How to remove Weblinks numbering and #display page?

Post by builder » Wed Oct 01, 2008 4:34 am

In case I'm not asking the wrong question, ok..what I want to accompish is:
weblink-joomla.PNG
See the Submit a Web Link in the User Menu
that is the thing I completely don't want it to show.
You do not have the required permissions to view the files attached to this post.

dlocc
Joomla! Apprentice
Joomla! Apprentice
Posts: 24
Joined: Tue Jun 17, 2008 9:04 pm

Re: [SOLVED] How to remove Weblinks numbering and #display page?

Post by dlocc » Wed Oct 01, 2008 3:28 pm

Go into your joomla backend and click on Menu's > usermenu and check the box that says "submit a weblink" and click delete in the top right hand corner.

User avatar
builder
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Sat Sep 13, 2008 1:12 pm

Re: [SOLVED] How to remove Weblinks numbering and #display page?

Post by builder » Thu Oct 02, 2008 4:23 am

Yeah, actually figured out yesterday just hasn't posted back. Was doing something else now, Thanks for your reply.

User avatar
adnet23
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 193
Joined: Tue Jul 18, 2006 4:31 am
Location: New York, NY, USA

Re: [SOLVED] How to remove Weblinks numbering and #display page?

Post by adnet23 » Thu Nov 13, 2008 4:49 pm

Similar question about modifying the "weblinks" page...

How would one add vertical space between each item. They are very close.
Free Software Support for the design community: tang3d[dot]com
website development news: developsis[dot]com

d3vlabs
Joomla! Explorer
Joomla! Explorer
Posts: 426
Joined: Thu Aug 18, 2005 10:41 am
Contact:

Re: [SOLVED] How to remove Weblinks numbering and #display page?

Post by d3vlabs » Sat Nov 22, 2008 4:29 am

like a charm

User avatar
holdencreative
Joomla! Explorer
Joomla! Explorer
Posts: 469
Joined: Thu Oct 13, 2005 1:51 am
Location: Hamilton, ON
Contact:

Re: [SOLVED] How to remove Weblinks numbering and #display page?

Post by holdencreative » Fri Dec 05, 2008 9:28 pm

Similar question about modifying the "weblinks" page...

How would one add vertical space between each item. They are very close.
I've found that using a height property in the CSS works for me..

ie -

Code: Select all

.sectiontableentry1 {

height: 80px;

}

.sectiontableentry2 {

height: 80px;

}
Joomla! is an all-volunteer project. Be Kind.

Did you know that you can make almost any Joomla! site into an app? http://weeverapps.com

Phehello
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Mon Aug 23, 2010 3:29 pm

Re: [SOLVED] How to remove Weblinks numbering and #display p

Post by Phehello » Mon Aug 23, 2010 3:42 pm

Hi,
This helped me out a great deal.

Thanks ...

Rgds,
Phehello


Locked

Return to “Administration 1.5”