-
AuthorPosts
-
cgc0202 Friend
cgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
February 28, 2009 at 12:16 am #138654Hello,
I got the correct tag:
<div class=”pagenavcounter”>Page 1 of 3</div>
css:
.pagenavcounter
{
background: url(../images/icon-pages.gif) no-repeat 0 11px;
font-weight: bold;
padding: 8px 14px 0 14px;
}I did a text-align: right; and it moved the pagenavcounter to the right, but then it hit the Article Index. What file script must be revised so that the pagenavcounter will be at the top of the Article Index — both at the right?
Thanks.
Cornelio
Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
March 9, 2009 at 10:42 am #294987Hi cgc0202,
Please send me your live url so that i could have closer look on the issue.
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 9, 2009 at 8:34 pm #295045<em>@JA Developer 116526 wrote:</em><blockquote>Hi cgc0202,
Please send me your live url so that i could have closer look on the issue.</blockquote>
Thanks JA Developer,
Here is a Sandbox Page created from Joomlart QuickStart Joomla 1.5.9-Teline II v1.6
http://joomlart.bayanihan-saranay.org/jte15x099/
and here is a sample article with multiple pages:
Walk this path with me.
http://joomlart.bayanihan-saranay.org/jte15x099/travel/travel-tips/163-walk-this-path-with-me.htmlI changed the pagenav CSS by adding a text-align right:
[PHP].pagenavcounter
{
text-align: right;
background: url(../images/icon-pages.gif) no-repeat 0 11px;
font-weight: bold;
padding: 8px 14px 0 14px;
}
[/PHP]The text for page navigator counter (i,e, Page 1 of 3) did align right. However, the page icon remain to the left, as shown in the article.
Moreover, since the table which contrained the Article Page Index. is also aligned right, they both aligned righ, one after another.
What needs o happen is more like this — allaligned on the right in a single table
Page 1 of 3 <= (First line)
Page Index <= (Title of table: second line)[List of indexed page titles here] <= (third and succeeding lines)
I hope the above sketch list is more clear. In other words, the pagenavcounter will be above and align right.
To achieve the above, it requires a slight layout change, by changing the script a bit, or something like this:
[PHP]<div id=”pagenavindexwrap”>
<div id=”pagenavcounter”>
<div class=”pagenavcounter”></div>
</div><div id=”particle-content-toc”>
<div class=”article-content-toc”></div>
</div>
</div>[/PHP]more or less, I just dp not know what PHP file to modify. In other words:
What php file page needed to be changed? How is the proposed changed done in terms of modifying the script?
Cornelio
************
Note: By the way, the question is a generic layout, CSS and script modification. It is not a bug issue, so it should be possible to perform a generic modification that any user may use — if they want to.Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
March 10, 2009 at 4:43 am #295118Hi,
I think you have changed a lot of code.
For the reason, please open files as follows to change:
+ templatesja_teline_iihtmlcom_contentsectionblog.php
+ templatesja_teline_iihtmlcom_contentcategoryblog.phpI am sorry for not being of much help in the case.
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 10, 2009 at 4:57 pm #295258<em>@JA Developer 116691 wrote:</em><blockquote>Hi,
I think you have changed a lot of code.
For the reason, please open files as follows to change:
+ templatesja_teline_iihtmlcom_contentsectionblog.php
+ templatesja_teline_iihtmlcom_contentcategoryblog.phpI am sorry for not being of much help in the case.</blockquote>
Hi JA Developer,
I already identified the actual file that needed to be changed:
/templates/ja_teline_ii/html/com_content/article/default.php
and the actual part of the script involved:
[PHP]
<div class=”article-content”>
<?php if (isset ($this->article->toc)) : ?>
<! — Begin: Place Page Nav Counter script here>
<div class=”pagenavcounter”>
Page nav counter here
</div><?php echo $this->article->toc; ?>
<?php endif; ?><?php echo $this->article->text; ?>
</div>
[/PHP]You will see that in the aforementioned script, I inserted this:
Page nav counter here
and if you look at the article itself:
Walk this path with me
http://joomlart.bayanihan-saranay.org/jte15x099/travel/travel-tips/163-walk-this-path-with-me.htmlthe term “Page nav counter here” is aligned to the right and on top of the Article Index, as I requested.
the term “Page nav counter here” must be replaced with the script that writes the pagenavcounter, i.e., Page 1 of 3, etc., and this ticket is solved.
Just one more needed: What and where is the PHP script that defines the “pagenavcounter”?
Do you know, or if not can you please ask a Joomlart staff who knows about scripting to identify the script?
Cornelio
Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
March 18, 2009 at 3:15 am #296569Hi cgc0202,
I am sorry for my delay.
<blockquote>What and where is the PHP script that defines the “pagenavcounter”?</blockquote>
It is pluginscontentpagebreak.php file. At about line 136, you will find following code:// page counter
$row->text .= '<div class="pagenavcounter">';
$row->text .= $pageNav->getPagesCounter();
$row->text .= '</div>';Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
March 18, 2009 at 3:21 am #296573Dear cgc !
Please open pagebreak.php file in plugins/content folder, go to line 135 , you will see code for print “page x of xx” text, please add your text at the top of code line.
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 18, 2009 at 4:49 am #296591<em>@JA Developer 118507 wrote:</em><blockquote>Hi cgc0202,
I am sorry for my delay.
It is pluginscontentpagebreak.php file. At about line 136, you will find following code:
// page counter
$row->text .= '<div class="pagenavcounter">';
$row->text .= $pageNav->getPagesCounter();
$row->text .= '</div>';
</blockquote>Thanks JA Developer,
If it is a plugin, how is the plugin then integrated to the default.php
/templates/ja_teline_ii/html/com_content/article/default.php
As far as I could ascertain, most of the information that goes into the contents of a page (article) are contained in the default.php (see below).
It was Hai who answered the ticket system, and requested FTP access to the URL i provided above. It appears that someone from Joomlart (perhaps you or Hai???) has accessed the directory, there are two extra default.php
/templates/ja_teline_ii/html/com_content/article/default.php
/templates/ja_teline_ii/html/com_content/article/default1.php
/templates/ja_teline_ii/html/com_content/article/default2.phpIs there any progress in resolving this?
Cornelio
default.php
[PHP]<?php // no direct access
defined(‘_JEXEC’) or die(‘Restricted access’); ?>
<?php if (($this->user->authorize(‘com_content’, ‘edit’, ‘content’, ‘all’) || $this->user->authorize(‘com_content’, ‘edit’, ‘content’, ‘own’)) && !($this->print)) : ?>
<div class=”contentpaneopen_edit<?php echo $this->params->get( ‘pageclass_sfx’ ); ?>” >
<?php echo JHTML::_(‘icon.edit’, $this->article, $this->params, $this->access); ?>
</div>
<?php endif; ?><?php if ($this->params->get(‘show_title’)) : ?>
<h2 class=”contentheading<?php echo $this->params->get( ‘pageclass_sfx’ ); ?>”>
<?php if ($this->params->get(‘link_titles’) && $this->article->readmore_link != ”) : ?>
<a href=”<?php echo $this->article->readmore_link; ?>” class=”contentpagetitle<?php echo $this->params->get( ‘pageclass_sfx’ ); ?>”>
<?php echo $this->escape($this->article->title); ?>
</a>
<?php else : ?>
<?php echo $this->article->title; ?>
<?php endif; ?>
</h2>
<?php endif; ?><?php if (!$this->params->get(‘show_intro’)) :
echo $this->article->event->afterDisplayTitle;
endif; ?><?php
if (
($this->params->get(‘show_create_date’))
|| (($this->params->get(‘show_author’)) && ($this->article->author != “”))
|| (($this->params->get(‘show_section’) && $this->article->sectionid) || ($this->params->get(‘show_category’) && $this->article->catid))
|| ($this->params->get(‘show_pdf_icon’) || $this->params->get(‘show_print_icon’) || $this->params->get(‘show_email_icon’))
|| ($this->params->get(‘show_url’) && $this->article->urls)
) :
?>
<div class=”article-tools clearfix”>
<div class=”article-meta”>
<?php if ($this->params->get(‘show_create_date’)) : ?>
<span class=”createdate”>
<?php echo JHTML::_(‘date’, $this->article->created, JText::_(‘DATE_FORMAT_LC2’)) ?>
</span>
<?php endif; ?><?php if (($this->params->get(‘show_author’)) && ($this->article->author != “”)) : ?>
<span class=”createby”>
<?php JText::printf(($this->article->created_by_alias ? $this->article->created_by_alias : $this->article->author) ); ?>
</span>
<?php endif; ?><?php if (($this->params->get(‘show_section’) && $this->article->sectionid) || ($this->params->get(‘show_category’) && $this->article->catid)) : ?>
<?php if ($this->params->get(‘show_section’) && $this->article->sectionid && isset($this->article->section)) : ?>
<span class=”article-section”>
<?php if ($this->params->get(‘link_section’)) : ?>
<?php echo ‘<a href=”‘.JRoute::_(ContentHelperRoute::getSectionRoute($this->article->sectionid)).'”>’; ?>
<?php endif; ?>
<?php echo $this->article->section; ?>
<?php if ($this->params->get(‘link_section’)) : ?>
<?php echo ‘</a>’; ?>
<?php endif; ?>
<?php if ($this->params->get(‘show_category’)) : ?>
<?php echo ‘ – ‘; ?>
<?php endif; ?>
</span>
<?php endif; ?>
<?php if ($this->params->get(‘show_category’) && $this->article->catid) : ?>
<span class=”article-section”>
<?php if ($this->params->get(‘link_category’)) : ?>
<?php echo ‘<a href=”‘.JRoute::_(ContentHelperRoute::getCategoryRoute($this->article->catslug, $this->article->sectionid)).'”>’; ?>
<?php endif; ?>
<?php echo $this->article->category; ?>
<?php if ($this->params->get(‘link_section’)) : ?>
<?php echo ‘</a>’; ?>
<?php endif; ?>
</span>
<?php endif; ?>
<?php endif; ?>
</div><?php if ($this->params->get(‘show_pdf_icon’) || $this->params->get(‘show_print_icon’) || $this->params->get(‘show_email_icon’)) : ?>
<div class=”buttonheading”>
<?php if (!$this->print) : ?>
<?php if ($this->params->get(‘show_email_icon’)) : ?>
<span>
<?php echo JHTML::_(‘icon.email’, $this->article, $this->params, $this->access); ?>
</span>
<?php endif; ?><?php if ( $this->params->get( ‘show_print_icon’ )) : ?>
<span>
<?php echo JHTML::_(‘icon.print_popup’, $this->article, $this->params, $this->access); ?>
</span>
<?php endif; ?><?php if ($this->params->get(‘show_pdf_icon’)) : ?>
<span>
<?php echo JHTML::_(‘icon.pdf’, $this->article, $this->params, $this->access); ?>
</span>
<?php endif; ?>
<?php else : ?>
<span>
<?php echo JHTML::_(‘icon.print_screen’, $this->article, $this->params, $this->access); ?>
</span>
<?php endif; ?>
</div>
<?php endif; ?><?php if ($this->params->get(‘show_url’) && $this->article->urls) : ?>
<span class=”article-url”>
<a href=”http://<?php echo $this->article->urls ; ?>” target=”_blank”>
<?php echo $this->article->urls; ?></a>
</span>
<?php endif; ?>
</div>
<?php endif; ?><?php echo $this->article->event->beforeDisplayContent; ?>
<div class=”article-content”>
<?php if (isset ($this->article->toc)) : ?>
<! — Begin: Place Page Nav Counter script here>
<div class=”pagenavcounterwrapper”>
Page nav counter here <br />
<?php echo $this->article->toc; ?>
</div>
<?php endif; ?><?php echo $this->article->text; ?>
</div><?php if ( intval($this->article->modified) !=0 && $this->params->get(‘show_modify_date’)) : ?>
<span class=”modifydate”>
<?php echo JText::_( ‘Last Updated’ ); ?> ( <?php echo JHTML::_(‘date’, $this->article->modified, JText::_(‘DATE_FORMAT_LC2’)); ?> )
</span>
<?php endif; ?><span class=”article_separator”> </span>
<?php echo $this->article->event->afterDisplayContent; ?>
[/PHP]Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
March 26, 2009 at 8:08 am #298133Dear cgc0202 ,
Sorry for delay , please remove default1.php and default2.php file and only keep default.php file , default1 and default2 is 2 file i add to your site to debug problem, sorry about this problem.
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 26, 2009 at 1:37 pm #298234<em>@hainn84 118511 wrote:</em><blockquote>Dear cgc !
Please open pagebreak.php file in plugins/content folder, go to line 135 , you will see code for print “page x of xx” text, please add your text at the top of code line.</blockquote>
Hi Hainn,
OK, I can remove that, but it goes back to my original question. How do aligh the pagenavcounter to the right?
I do not know nor see how the plugin is linked to the page.
Cornelio
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 26, 2009 at 1:42 pm #298235<em>@hainn84 118511 wrote:</em><blockquote>Dear cgc !
Please open pagebreak.php file in plugins/content folder, go to line 135 , you will see code for print “page x of xx” text, please add your text at the top of code line.</blockquote>
Hi Hainn,
I missed this response. I will check it tonight. I am not adding any text. I just placed that to show where I want it ti appear. To the right or on top right of the Article TOC.
Cornelio
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 27, 2009 at 4:27 am #298360<em>@hainn84 118511 wrote:</em><blockquote>Dear cgc !
Please open pagebreak.php file in plugins/content folder, go to line 135 , you will see code for print “page x of xx” text, please add your text at the top of code line.</blockquote>
Hi JA Developer and Hainn,
I finally isolated the code in the pagebreak.php file:
[PHP] // traditional mos page navigation
jimport(‘joomla.html.pagination’);
$pageNav = new JPagination( $n, $page, 1 );// page counter
$row->text .= ‘<div class=”pagenavcounter”>’;
$row->text .= $pageNav->getPagesCounter();$row->text .= ‘</div>’;
[/PHP]I want to add whatever is needed in the above script, as the last row in the Table of Contents.
[PHP]
function plgContentCreateTOC( &$row, &$matches, &$page )
{$heading = $row->title;
// TOC Header
$row->toc = ‘
<table cellpadding=”0″ cellspacing=”0″ class=”contenttoc”>
<tr>
<th>’
. JText::_( ‘Article Index’ ) .
‘</th>
</tr>
‘;// TOC First Page link
$row->toc .= ‘
<tr>
<td>
<a href=”‘. JRoute::_( ‘&showall=&limitstart=’) .'” class=”toclink”>’
. $heading .
‘</a>
</td>
</tr>
‘;$i = 2;
foreach ( $matches as $bot )
{
$link = JRoute::_( ‘&showall=&limitstart=’. ($i-1) );if ( @$bot[0] )
{
$attrs2 = JUtility::parseAttributes($bot[0]);if ( @$attrs2[‘alt’] )
{
$title = stripslashes( $attrs2[‘alt’] );
}
elseif ( @$attrs2[‘title’] )
{
$title = stripslashes( $attrs2[‘title’] );
}
else
{
$title = JText::sprintf( ‘Page #’, $i );
}
}
else
{
$title = JText::sprintf( ‘Page #’, $i );
}$row->toc .= ‘
<tr>
<td>
<a href=”‘. $link .'” class=”toclink”>’
. $title .
‘</a>
</td>
</tr>
‘;
$i++;
}// Get Plugin info
$plugin =& JPluginHelper::getPlugin(‘content’, ‘pagebreak’);$params = new JParameter( $plugin->params );
if ($params->get(‘showall’) )
{
$link = JRoute::_( ‘&showall=1&limitstart=’);
$row->toc .= ‘
<tr>
<td>
<a href=”‘. $link .'” class=”toclink”>’
. JText::_( ‘All Pages’ ) .
‘</a>
</td>
</tr>
‘;
}
$row->toc .= ‘</table>’;
}[/PHP]I cannot get it to work. I get an error whatever I try. If this can be done, I this will solve the question, finally.
Thanks.
Cornelio
-
AuthorPosts
This topic contains 12 replies, has 3 voices, and was last updated by cgc0202 15 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum