Not mentioned in the instructions (with zip) about altering the query for your database, please explain the query to us
Code:
$photo_query=$vbulletin->db->query_read("SELECT userid FROM photos");
while ($inids = $vbulletin->db->fetch_array($photo_query)) {
$posid = $inids[userid];
$vbulletin->db->query_write("UPDATE ".TABLE_PREFIX."userfield SET field6 = 'Yes' WHERE ".TABLE_PREFIX."userfield.userid = $posid AND ".TABLE_PREFIX ."userfield.field6 != 'Yes'");
}
<- thats mine, no photopost field prefix and is "userfield.field6" corresponding to the id of the new profile field or what?, ( was set to userfield.field61 ) ive run the cron with no errors, i suppose we have to update thread information or any update counters also before anything shows, besides running the cron...? as yet nothing for me showing... unless i remove the if statement "<if condition="$post['6'] == 'Yes'">"
and what this ? > ../gallery/showgallery.php/cat/500/ppuser/$post[userid]
/cat/500/ppuser? your using search engine friendly, im not...
My pp database is in the same one I use for vbulletin not a seperate database.
Here is my gallery.php file. My custom field is feild8.
If I go into my database (database name is satellit_vb) and go to the userfield I can input Yes in field 8 and then it shows up, so this shows me it is not looking at the photopost database correctly.
Any ideas?
Code:
<?
////////////////////////////////////////////
// MAKE SURE YOU EDIT THIS WHERE STATED //
// Then upload to /includes/cron/ //
////////////////////////////////////////////
// Edit - Make sure this is correct
define('FILE_VERSION', '3.5.4'); // this should match install.php
error_reporting(E_ALL & ~E_NOTICE);
if (!is_object($vbulletin->db))
{
exit;
}
// Edit this line to reflect your database structure
$photo_query=$vbulletin->db->query_read("SELECT userid FROM pp_photos");
while ($inids = $vbulletin->db->fetch_array($photo_query)) {
$posid = $inids[userid];
$vbulletin->db->query_write("UPDATE ".TABLE_PREFIX."userfield SET field8 = 'Yes' WHERE ".TABLE_PREFIX."userfield.userid = $posid AND ".TABLE_PREFIX ."userfield.field8 != 'Yes'");
}
log_cron_action("gallery task updated", $nextitem);
?>
I'm assuming I'm getting this error message because I have my photopost database separate from my vbulletin database (and it requires different users - mustangg_bowers is the user for my vbulletin database and mustangg_bowers1 is the user for my photopost database). Is there anyway around this??
I'm not sure if you can use other username/passwords using the vbulletin mysql functions, I'll have a look at this though and report back.
The separate databases and different usernames have not been an issue with anything else I have done on my vBulletin board and Photopost gallery. This is the first time I've run into problems with it... I've already done numerous mods without issues.