Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
Hi,
I was just wondering if anyone has ever messed with phpFox. I’ve been thrown to the wolves!! :p
We have one developer working on a couple modifications, but it’s taking a long time for him/her to finish so they thought that I could just blink my eyes and make things work. While they’re working on their mods, I have to figure out how to change all kinds of things.
I won’t go into details, it’s too much right now. I just cannot find any documentation on doing anything other than installing the basic package. I found some video tutorials, but you have to pay for them.
Thanks to anyone who can shed some light.
Never used it. Is it a CMS?
I’m not sure how you’d classify it. It’s a sort of community site application (a la MySpace), I guess.
Hi all,
Still working on this, but have made some decent progress. I’m trying to give the admin the ability to export certain users out of the DB into a CSV. I’m not on a php5 box (I know…boooo!), so the csv functions are not available. I found a little snippet online, but it’s messing up the data.
$result = mysql_query($sql) or die(mysql_error());
$csv_output = "";
while($row=mysql_fetch_assoc($result))
{
foreach($row as $key=>$value)
{
if($key = "welcomepack"){$csv_output .= " '". $value ."'";}else{$csv_output .= " '". $value ."',";}
}
if($key = "welcomepack")
{
$csv_output .= "\n";
}
}
header("Content-type: application/vnd.ms-excel");
header("Content-disposition: attachment; filename=csvRide.csv");
print $csv_output;
exit;
http://ridering.net/csv-dir/csvDL.php
that link will take you to the download.
If anyone has any thoughts as to why the data is being separated like that, please let me know. I’ve had help from some of the users at Sitepoint, but still no luck.
Thanks!
I see a couple things you may want to check.
1. Your if statements will always be true. Try changing if($key = “welcomepack”) to if($key == “welcomepack”)
2. If you mean for your values to be in single quotes that if fine. If not, change $csv_output .= “ ‘”. $value .”’”; to $csv_output .= “ “. $value;
3. Are your values delimited by spaces or actually by commas? You may want to change to $csv_output .= “, “. $value;
4. You will have to check to see if it is the first or last entry and add/remove commas as needed.
Thanks,
I don’t know why there’s only one equals sign in those conditionals…
$sql = "SELECT * FROM user WHERE type = '6' ";
//echo $sql;
$result = mysql_query($sql) or die(mysql_error());
$csv_output = "";
while($row=mysql_fetch_assoc($result))
{
foreach($row as $key=>$value)
{
if($key = "welcomepack"){$csv_output .= " '". $value ."'";}else{$csv_output .= " '". $value ."',";}
}
if($key = "welcomepack")
{
$csv_output .= "\n";
}
}
header("Content-type: application/vnd.ms-excel");
header("Content-disposition: attachment; filename=csvRide.csv");
print $csv_output;
exit;
I have the values encased in single quotes so that if there are commas in the data, it doesn’t cause it to separate by those commas in the csv. “welcomepack” is the last field, so that’s why i have that conditional there to check…if it is, don’t put a comma after it. if it isn’t, then put a comma.
When I print it out on the screen, without the prompt to download, all the data looks fine. It doesn’t cut it up and put it in places it shouldn’t be.
edit: dammit, the php formatting wipes extra equals signs away…they’re there.
Ok, I see what is happening. Your array is going to have both string indexes and numerical indexes. Maybe use a for loop instead of foreach?
ahh, thank you both.
Not to sound like a killjoy, but couldn’t you just use phpMyAdmin for this? It has excellent CSV support built-in, preventing you from having to reinvent the wheel… Also, with a quick glance at this page in the mySQL 4.1.x Reference Manual, I discovered that ‘mysqldump’ accepts the following flags:
--fields-terminated-by=..., --fields-enclosed-by=..., --fields-optionally-enclosed-by=..., --fields-escaped-by=...
So there’s really no need to even bother with PHP. _
no. it’s not for me, it’s for the client. I don’t want to give the client access to phpMyAdmin.
Most business owners wedding invitations know well their business preferences as evidenced in wedding invitation their choices of logos,letterhead and exhibits for trade shows. Often, these preferences don’t translate to creative bridesmaid dresses designs of wedding invitation a high professional quality when attempted in-house.
So you are thinking about having your wedding during the winter? <a
href=“http://www.rs2guru.com/”>unique wedding invitations</a>
If you want a winter wedding, there a few things that you going to need to account for. <a
href=“http://www.vponsale.com/”>wedding dresses</a>
With the right planning, winter weddings can be just as beautiful as spring weddings. <a
href=“http://www.vponsale.com/”>wedding gowns</a>
In my opinion, they can be more so.<a href=“http://www.vponsale.com/bridesmaid-dresses/”>bridesmaid
dresses</a> However, with the wrong planning a winter wedding can be ten times more disastrous than the worst
of springtime weddings. <a href=“http://www.vponsale.com/invitations/”>cheap wedding invitations</a>
Your wedding could be a winter wonderland or if you are not careful, a winter wasteland.
1 to 15 of 15