It would be possible to make this SQL query periodically??
update Profiles
set Avatar=NEW_ITEM_2
thx
It would be possible to make this SQL query periodically?? thx |
There is a Dolphin cron table that holds cron jobs for Dolphin; you would add to that table as well as adding the function that performs the update. I suggest studying that table and the functions to see how it is done. Geeks, making the world a better place |
Of course you can do it outside of Dolphin as well by adding the script to run and creating a cron job on the server. Geeks, making the world a better place |
I do not know mysql. My hosting provider tells me to look me expert that generates me the file, so they can add the cron job. |
To give a detailed answer requires detailed information. Exactly what are you wanting to accomplish? What is NEW_ITEM_2? Will you be using the avatar module or using photo thumbs? Dolphin handles the icon differently; you have to know about how they are stored on the server, etc. Geeks, making the world a better place |
Thank you very much. I 'm adapting the script arrowchat to my dolphin. The NEW_ITEM_2 field is a field that I gather with user registration . Arrowchat take the Avatar keeps the information from the field Profiles table in a variable. Then,This variable that I use it to show another image in chat . I do not use the Avatar module. |
Originally you basically wanted to set the data in the Avatar field equal to NEW_ITEM_2; Now you want to set the Avatar field equal to the NEW_ITEM_2 field; for one, both fields need to be of the same type. See, details are important.
I suggest posting a job for this arrowchat integration; I may be interested in the job. Geeks, making the world a better place |
they are the same type, there is no problem, |
The integration of arrowchat with dolphin does not work properly with photo thumbnail profile. Instead of displaying the avatar image I want to show an image that depends on NEW_ITEM_2 . Actually I 've already got , but I need to be updated periodically. |
OK, I think I understand. Arrow Chat is coded to use the avatar from Dolphin but you want it to use photo icon instead. Avatar uses a number that corresponds to the image stored in the avatar module. Would it be better to change Arrow Chat to use photo icon? If not, then you will need to store a user icon in the avatar module and store the number in the avatar field so that when Arrow chat looks up the avatar it will find it. By the way, there are two avatar images, the regular size and a smaller one. Geeks, making the world a better place |
The variable that stores the number of the avatar is $image. But I can not find where is defined to change .
arrowchat/includes/integration.php /** * This function returns the URL of the avatar of the specified user ID. * * @param userid the user ID of the user * @param image if the image includes more than just a user ID, this param is passed * in from the avatar row in the buddylist and get user details functions. * @return the link of the user ID's profile */ function get_avatar($image, $user_id) { global $base_url;
if (is_file(dirname(dirname(dirname(__FILE__))) . '/modules/boonex/avatar/data/images/' . $image . '.jpg')) { return $base_url . '../modules/boonex/avatar/data/images/' . $image . '.jpg'; } else { return $base_url . AC_FOLDER_ADMIN . "/images/img-no-avatar.gif"; } }
|
Continuing the cron task . Is this correct serious file to add to the table sys_cron_jobs ? <?php
require_once( BX_DIRECTORY_PATH_INC . 'db.inc.php' ); require_once('BxDolCron.php');
class BxDolCronAvatar extends BxDolCron { db_res("UPDATE `Profiles` SET `Avatar`=`NEW_ITEM_2`");
} |
I would do it that way ... <?php
function manipulateAllAvatarReferences() {
INSERT INTO `sys_cron_jobs` ( `name`, `time`, `class`, `file`, `eval`) VALUES http://www.boonex.com/market/posts/paansystems - your resource for Dolphin Pro |
thank you very much. How often is the runs ? |
Every minute in this example ... http://www.boonex.com/market/posts/paansystems - your resource for Dolphin Pro |