Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #1  
Old 02-22-2005, 05:45 AM
mark Offline
pp veteran
 
Join Date: Feb 2005
Location: Atlanta, GA USA
Posts: 89
Multi-categories - if downloaded, read this

I missed a piece in my doc that you'll need...Its the piece that actually builds the check boxes on the "new image" page.

In your admin/index.php file, you will also need to replace these lines:

Code:
if($_GET['view'] == "") {
    ?>
    <div id='jcaption'>
    Post a New Image</div>
    <div id="content">
    <form method="post" action="<?php echo $PHP_SELF; ?>?x=save" enctype="multipart/form-data">
    Image Title<br />
    <input type="text" name="headline" style="width:95%;" /><p />
    
    File Under Category<br />
    <select name="category">
    <?php
    $query = mysql_query("select * from ".$pixelpost_db_prefix."categories order by name");
    while(list($id,$name) = mysql_fetch_row($query)) {
        $name = pullout($name);
        echo "<option value='$id'>$name</option>\n";
        }
    ?>
    </select><p />
With these lines:

Code:
if($_GET['view'] == "") {
    ?>
    <div id='jcaption'>
    Post a New Image</div>
    <div id="content">
    <form method="post" action="<?php echo $PHP_SELF; ?>?x=save" enctype="multipart/form-data">
    Image Title<br />
    <input type="text" name="headline" style="width:95%;" /><p />
    
    File Under Category<br /><br />
    <?php
    $query = mysql_query("select * from ".$pixelpost_db_prefix."categories order by name");
    while(list($id,$name) = mysql_fetch_row($query)) {
        $name = pullout($name);
        echo "<input type=checkbox name=box[] value=".$id."> ".$name."<br/>";
        }
    ?>
    <br /><br />
Sorry everyone...
Reply With Quote
  #2  
Old 02-22-2005, 06:03 AM
usafdcc's Avatar
usafdcc Offline
pp regular
 
Join Date: Jan 2005
Location: New Mexico, USA
Posts: 36
Right, I thought that I was missing something when I did not find the check boxes in admin/new images. I did notice that if you got rid of the <br/> (see below in red) the check boxes will go left to right instead of up and down. Just for those that need extra room

Quote:
if($_GET['view'] == "") {
?>
<div id='jcaption'>
Post a New Image</div>
<div id="content">
<form method="post" action="<?php echo $PHP_SELF; ?>?x=save" enctype="multipart/form-data">
Image Title<br />
<input type="text" name="headline" style="width:95%;" /><p />

File Under Category<br />
<select name="category">
<?php
$query = mysql_query("select * from ".$pixelpost_db_prefix."categories order by name");
while(list($id,$name) = mysql_fetch_row($query)) {
$name = pullout($name);
echo "<option value='$id'>$name</option>\n";
}
?>
</select><p />


With these lines:

Code:
if($_GET['view'] == "") {
?>
<div id='jcaption'>
Post a New Image</div>
<div id="content">
<form method="post" action="<?php echo $PHP_SELF; ?>?x=save" enctype="multipart/form-data">
Image Title<br />
<input type="text" name="headline" style="width:95%;" /><p />

File Under Category<br /><br />
<?php
$query = mysql_query("select * from ".$pixelpost_db_prefix."categories order by name");
while(list($id,$name) = mysql_fetch_row($query)) {
$name = pullout($name);
echo "<input type=checkbox name=box[] value=".$id."> ".$name."<br/>";
}
?>
<br /><br />
__________________
Steve@ISeeItLikeThis.com
Reply With Quote
  #3  
Old 02-22-2005, 01:34 PM
mark Offline
pp veteran
 
Join Date: Feb 2005
Location: Atlanta, GA USA
Posts: 89
everything else is working ok though?
Reply With Quote
  #4  
Old 02-22-2005, 02:55 PM
usafdcc's Avatar
usafdcc Offline
pp regular
 
Join Date: Jan 2005
Location: New Mexico, USA
Posts: 36
Yes, absolutly fine. Good job on this addition
__________________
Steve@ISeeItLikeThis.com
Reply With Quote
  #5  
Old 02-22-2005, 03:17 PM
mark Offline
pp veteran
 
Join Date: Feb 2005
Location: Atlanta, GA USA
Posts: 89
awesome!!....i've been worried.

usafdcc - btw, loved browsing your site....have you really had over 3000 visitors today?? my god!!
Reply With Quote
  #6  
Old 02-22-2005, 03:35 PM
usafdcc's Avatar
usafdcc Offline
pp regular
 
Join Date: Jan 2005
Location: New Mexico, USA
Posts: 36
Thank you for the compliments! 3200 - Yes, lots of visitors, but not many comments. They always make my day.
__________________
Steve@ISeeItLikeThis.com
Reply With Quote
  #7  
Old 02-28-2005, 06:53 AM
Anonymous Offline
pixelpost guru
 
Join Date: Oct 2004
Posts: 810
image count?

My categories show up but when I assign more than one image it will not register in the image count?
Reply With Quote
  #8  
Old 02-28-2005, 01:45 PM
mark Offline
pp veteran
 
Join Date: Feb 2005
Location: Atlanta, GA USA
Posts: 89
Well, not sure where you had your counts showing up, but since this change wasn't an "addon"...which in retrospect, i should have added some "addon" stuff that I changed in my index.php..

Here is the code i use to show count. I have my categories showing in a dropdown list in my archive page...

You'll probably just have to see what part you use out of this...

You may only need the piece of code "catcnt"

Code:
// build browse menu
$browse_select = "<select name='browse' 
onChange='self.location.href=this.options[this.selectedIndex].value;'><option value=''>Archives by Category</option><option value='?x=browse&category='>$lang_browse_all ($pixelpost_photonumb)</option>";
$query = mysql_query("select * from ".$pixelpost_db_prefix."categories order by name");
while(list($id,$name) = mysql_fetch_row($query)) {
    $name = pullout($name);
    
	$catquery = mysql_query("select id from ".$pixelpost_db_prefix."categories where name='$name'");
   $category_id = mysql_fetch_array($catquery);
	$category_id = pullout($category_id['id']);	
	
	$catcnt = mysql_query("select count(*) as count from ".$pixelpost_db_prefix."catassoc where cat_id='$category_id'");
	$catcnt_row = mysql_fetch_array($catcnt);
	$category_count_number = $catcnt_row['count'];	
    
   $browse_select .= "<option value='?x=browse&category=$id&catname=$name'>$name ($category_count_number)</option>";
    }
$browse_select .= "</select>";
Reply With Quote
  #9  
Old 02-28-2005, 07:39 PM
Anonymous Offline
pixelpost guru
 
Join Date: Oct 2004
Posts: 810
paged_archive addon

I am also using paged_archive addon.
This is where I am getting the error in the archive section not the multi categories addon.

I guess they are not compatible.

here is my example
www.larock.org
Reply With Quote
  #10  
Old 02-28-2005, 07:45 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
yes. I'm almost sure about the incompatiblity
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 02:58 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs