vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Photopost "gallery" clickable icon in postbit(_legacy) and/or profiles. (https://vborg.vbsupport.ru/showthread.php?t=111962)

mini2 04-01-2006 10:00 PM

Photopost "gallery" clickable icon in postbit(_legacy) and/or profiles.
 
Gone

Doha Services 04-02-2006 10:35 AM

Nice :)

bada_bing 04-04-2006 02:56 AM

Will test tomorrow

b6gm6n 04-05-2006 01:58 AM

cheers, lovely mod

-b6

b6gm6n 04-06-2006 02:13 AM

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...

?cat=500&ppuser=$post[userid]
(for me)

-b6

scottct1 04-06-2006 05:57 PM

Not sure why mine is not working...

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);
?>


scottct1 04-08-2006 06:05 AM

Yes that works well thank you!

KBowers 05-08-2006 11:48 PM

I'm trying to get this to work, but I'm getting the following error messages:

Database error in vBulletin 3.5.4:

Invalid SQL:
SELECT userid FROM mustangg_photopost.pp_photos;

MySQL Error : Access denied for user 'mustangg_bowers'@'%' to database 'mustangg_photopost'
Error Number : 1044
Date : Monday, May 8th 2006 @ 04:30:20 PM
Script : http://www.mustanggt.org/forums/cron.php?&rand=503085
Referrer : http://www.mustanggt.org/forums/showthread.php?t=41439
IP Address : 69.117.185.102
Username : Unregistered
Classname : vb_database

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??

Help! :bunny: Thanks!

KBowers 05-09-2006 07:01 PM

Quote:

Originally Posted by mini2
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.

vBulletin board - http://www.mustanggt.org/forums/index.php

Photopost gallery - http://www.mustanggt.org/photopost/index.php

Thanks.

KBowers 05-09-2006 07:28 PM

Quote:

Originally Posted by mini2
If you could provide a link to the hack you use to display the images on your forum homepage that could help me.

Thanks.

Here you go... http://www.photopost.com/forum/showthread.php?t=121970

Thanks!


All times are GMT. The time now is 07:14 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01162 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete