• b2evo
  • Front Page
  • Contact
  • Login
  • reset page

Far Fields

  • Andromeda ¦ First Contact
  • Blush ¦ Private
  • Dad ¦ Private
  • Vyaj ¦ Immigration & Asylum Cases

Near Fields

  • My Bits
  • Behind the Sceanic
  • vOw ¦ Vegan Organic Wholefood

Old Fields

  • 1996 Site
  • Old Search Site

Blogs

  • b2Evo ¦ Blog techie stuff
  • eLf ¦ Updates on the land
  • blInk ¦ Some useless links
  • spAce ¦ Thoughts on being
  • j&j ¦ Prospectors of Kern
  • av0id ¦ How I Got Here

Post Count: published &| protected (Members)Updated: January 12th, 2015

Created: 11/01/15

Couldn't find a variable to grab such so resorted to an SQL SELECT to find. I put the code in

1. SQL Code
[/skins/my_usual_skin/_sidebar.php]
Just after first php tage


<php// getting postcount
$reg = 'published';
if (isset($current_User))
$reg = 'protected';

mysql_connect("localhost", "userName", "passWord") or die(mysql_error());
mysql_select_db("dataBaseName") or die(mysql_error());

$row_query = "
SELECT evo_items__item.post_main_cat_ID,
evo_items__item.post_ptyp_ID,
evo_items__item.post_status,
evo_categories.cat_ID,
evo_categories.cat_blog_ID
FROM evo_items__item
JOIN evo_categories
ON evo_items__item.post_main_cat_ID = evo_categories.cat_ID
AND evo_categories.cat_blog_ID = $Blog->ID
AND evo_items__item.post_ptyp_ID = 1
AND (evo_items__item.post_status = 'published' OR evo_items__item.post_status = '$reg')
";

$row_result = mysql_query($row_query) or die(mysql_error());

$postcount = 1;

while($evo_items_item_row = mysql_fetch_array($row_result) )
{
$postcount++;
}

$listplots = $postcount;

echo '<li style="margin-top:-.7em; margin-bottom:-1em"><p style="height:0.7em"><br /><br /><br /><br /><br /><a href="http://' . $_SERVER['HTTP_HOST'] . '/' . $Blog->name . '.php?disp=postidx">View Index of All <b>' . $listplots . '</b> Posts</a></p></li>';

# In case of this domain must add .'/blog/' after HOST

2. Changed pagination from 1000 to 10

In [/skin/_postidx.disp.php]
LIne 28: 'limit' => 10,
and copied to [/skin/my_usual.skin/_postidx.disp.php]

  roger
print   Print     
 
  •  Paged Index of 133 Posts

  • Last nineteen

    • Add html figure tag
    • Validation 7.2.5
    • elfgifs_plugin
    • Add sub text button
    • [autocorrect] validation
    • Versions & Database
    • Math Terms & Plugin
    • My Search Hack
    • figure tag
    • evobar toolbar
    • Front Page Collections #
    • Move to a new line using CSS not <br />
    • Version 6.10.6 & php 7
    • Stuck on Version 6.10.5
    • Limit Login Attempts
    • 6.10.5
    • Add Number to Comment
    • 6.10.4
    • v 6.10.*
  • Search


Valid HTML 5.0    ubuntu link    duckduckgo link    b2evolution link    firefox link    Creative Commons Licence    Valid CSS!