• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP vB_DataManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中vB_DataManager的典型用法代码示例。如果您正苦于以下问题:PHP vB_DataManager类的具体用法?PHP vB_DataManager怎么用?PHP vB_DataManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了vB_DataManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: vB_DataManager_Blog_Category

	/**
	* Constructor - checks that the registry object has been passed correctly.
	*
	* @param	vB_Registry	Instance of the vBulletin data registry object - expected to have the database object as one of its $this->db member.
	* @param	integer		One of the ERRTYPE_x constants
	*/
	function vB_DataManager_Blog_Category(&$registry, $errtype = ERRTYPE_STANDARD)
	{
		parent::vB_DataManager($registry, $errtype);

		($hook = vBulletinHook::fetch_hook('blog_categorydata_start')) ? eval($hook) : false;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:12,代码来源:class_dm_blog_category.php


示例2: vB_DataManager_SocialGroup

 /**
  * Constructor - checks that the registry object has been passed correctly.
  *
  * @param	vB_Registry	Instance of the vBulletin data registry object - expected to have the database object as one of its $this->db member.
  * @param	integer		One of the ERRTYPE_x constants
  */
 function vB_DataManager_SocialGroup(&$registry, $errtype = ERRTYPE_STANDARD)
 {
     parent::vB_DataManager($registry, $errtype);
     ($hook = vBulletinHook::fetch_hook('socgroupdata_start')) ? eval($hook) : false;
 }
开发者ID:holandacz,项目名称:nb4,代码行数:11,代码来源:class_dm_socialgroup.php


示例3: vB_DataManager_Album

 /**
  * Constructor - checks that the registry object has been passed correctly.
  *
  * @param	vB_Registry	Instance of the vBulletin data registry object - expected to have the database object as one of its $this->db member.
  * @param	integer		One of the ERRTYPE_x constants
  */
 function vB_DataManager_Album(&$registry, $errtype = ERRTYPE_STANDARD)
 {
     parent::vB_DataManager($registry, $errtype);
     ($hook = vBulletinHook::fetch_hook('albumdata_start')) ? eval($hook) : false;
 }
开发者ID:holandacz,项目名称:nb4,代码行数:11,代码来源:class_dm_album.php


示例4: vB_DataManager_Cms_Layout

	/**
	* Constructor - checks that the registry object has been passed correctly.
	*
	* @param	vB_Registry	Instance of the vBulletin data registry object - expected to have the database object as one of its $this->db member.
	* @param	integer		One of the ERRTYPE_x constants
	*/
	function vB_DataManager_Cms_Layout(&$registry, $errtype = ERRTYPE_STANDARD)
	{
		parent::vB_DataManager($registry, $errtype);

		($hook = vBulletinHook::fetch_hook('cms_layout_start')) ? eval($hook) : false;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:12,代码来源:class_dm_cms_layout.php


示例5: vB_DataManager_Pt_IssueType

 /**
  * Constructor - checks that the registry object has been passed correctly.
  *
  * @param	vB_Registry	Instance of the vBulletin data registry object - expected to have the database object as one of its $this->db member.
  * @param	integer		One of the ERRTYPE_x constants
  */
 function vB_DataManager_Pt_IssueType(&$registry, $errtype = ERRTYPE_STANDARD)
 {
     parent::vB_DataManager($registry, $errtype);
     ($hook = vBulletinHook::fetch_hook('pt_issuetypedata_start')) ? eval($hook) : false;
 }
开发者ID:holandacz,项目名称:nb4,代码行数:11,代码来源:class_dm_pt_issuetype.php


示例6: __construct

 /**
  * Constructor - checks that the registry object has been passed correctly.
  *
  * @param	vB_Registry	Instance of the vBulletin data registry object - expected to have the database object as one of its $this->db member.
  * @param	integer		One of the ERRTYPE_x constants
  */
 public function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
 {
     parent::vB_DataManager($registry, $errtype);
     ($hook = vBulletinHook::fetch_hook('stylevardata_start')) ? eval($hook) : false;
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:11,代码来源:class_dm_stylevar.php


示例7: vB_DataManager_vBCms_Widget

	/**
	* Constructor - checks that the registry object has been passed correctly.
	*
	* @param	vB_Registry	Instance of the vBulletin data registry object - expected to have the database object as one of its $this->db member.
	* @param	integer		One of the ERRTYPE_x constants
	*/
	function vB_DataManager_vBCms_Widget(&$registry, $errtype = ERRTYPE_STANDARD)
	{
		parent::vB_DataManager($registry, $errtype);

		($hook = vBulletinHook::fetch_hook('vbcms_widgetdm_start')) ? eval($hook) : false;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:12,代码来源:class_dm_cms_widget.php


示例8: delete

 function delete()
 {
     if ($this->fetch_field('type') == 'category') {
         $this->registry->db->query("delete from " . TABLE_PREFIX . "{$this->table} where type='template' and userid=" . $this->fetch_field('userid') . " and parentid=" . $this->fetch_field('pid'));
     }
     parent::delete();
 }
开发者ID:rcdesign-cemetery,项目名称:vb-foreign_mod_fixes,代码行数:7,代码来源:class_dm_posttemplates.php


示例9:

 /**
  * Sets a bit in a bitfield
  *
  * @param	string	Name of the database bitfield (options, permissions etc.)
  * @param	string	Name of the bit within the bitfield (canview, canpost etc.)
  * @param	boolean	Whether the bit should be set or not
  *
  * @return	boolean
  */
 function set_bitfield($fieldname, $bitname, $onoff)
 {
     // there are 2 permissions in the the admin permission bitfield that don't actually
     // belong in this table...
     if ($fieldname == 'adminpermissions' and ($bitname == 'ismoderator' or $bitname == 'cancontrolpanel')) {
         return false;
     }
     return parent::set_bitfield($fieldname, $bitname, $onoff);
 }
开发者ID:holandacz,项目名称:nb4,代码行数:18,代码来源:class_dm_admin.php


示例10: intval

 /**
  * Additional data to update after a save call (such as denormalized values in other tables).
  * In batch updates, is executed for each record updated.
  *
  * @param	boolean	Do the query?
  */
 function post_save_each($doquery = true)
 {
     // attachment counts
     if ($this->fetch_field('visible') and empty($this->existing['visible'])) {
         // new attachment or making one invisible
         $this->registry->db->query_write("\r\n\t\t\t\tUPDATE " . TABLE_PREFIX . "pt_issue SET\r\n\t\t\t\t\tattachcount = attachcount + 1\r\n\t\t\t\tWHERE issueid = " . intval($this->fetch_field('issueid')));
     } else {
         if (!$this->fetch_field('visible') and !empty($this->existing['visible'])) {
             // hiding visible attachment
             $this->registry->db->query_write("\r\n\t\t\t\tUPDATE " . TABLE_PREFIX . "pt_issue SET\r\n\t\t\t\t\tattachcount = IF(attachcount > 0, attachcount - 1, 0)\r\n\t\t\t\tWHERE issueid = " . intval($this->fetch_field('issueid')));
         }
     }
     if (!$this->condition and $this->fetch_field('visible')) {
         // insert issue change
         $change =& datamanager_init('Pt_IssueChange', $this->registry, ERRTYPE_STANDARD);
         $change->set_info('roll_post_time_limit', 0);
         // disable folding for attachment uploads
         $change->set('issueid', $this->fetch_field('issueid'));
         $change->set('userid', $this->registry->userinfo['userid']);
         $change->set('field', 'attachment_uploaded');
         $change->set('newvalue', $this->fetch_field('filename'));
         $change->set('oldvalue', '');
         $change->save();
     }
     ($hook = vBulletinHook::fetch_hook('ptattachdata_postsave')) ? eval($hook) : false;
     return parent::post_save_each($doquery);
 }
开发者ID:holandacz,项目名称:nb4,代码行数:33,代码来源:class_dm_attachment_pt.php


示例11: eval

	/**
	* Additional data to update after a delete call (such as denormalized values in other tables).
	*
	* @access protected
	*
	* @param boolean $doquery					Do the query?
	*/
	function post_delete($doquery = true)
	{
		require_once(DIR . '/includes/functions_socialgroup.php');
		fetch_socialgroup_newest_groups(true, false, !$this->registry->options['sg_enablesocialgroupicons']);

		($hook = vBulletinHook::fetch_hook('socgroupicondata_delete')) ? eval($hook) : false;
		return parent::post_delete($doquery);
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:15,代码来源:class_dm_socialgroupicon.php


示例12: eval

 function post_delete($doquery = true)
 {
     ($hook = vBulletinHook::fetch_hook('userpicdata_delete')) ? eval($hook) : false;
     return parent::post_delete($doquery);
 }
开发者ID:holandacz,项目名称:nb4,代码行数:5,代码来源:class_dm_userpic.php


示例13: save

	/**
	 * Overridding parent function to add search index updates
	 *
	* @param	boolean	Do the query?
	* @param	mixed	Whether to run the query now; see db_update() for more info
	* @param 	bool 	Whether to return the number of affected rows.
	* @param 	bool	Perform REPLACE INTO instead of INSERT
	8 @param 	bool	Perfrom INSERT IGNORE instead of INSERT
	*
	* @return	mixed	If this was an INSERT query, the INSERT ID is returned
	*/
	function save($doquery = true, $delayed = false, $affected_rows = false, $replace = false, $ignore = false)
	{
		// Call and get the new id
		$result = parent::save($doquery, $delayed, $affected_rows, $replace, $ignore);
		require_once DIR . '/vb/search/indexcontroller/queue.php' ;
		// Search index maintenance
		vb_Search_Indexcontroller_Queue::indexQueue('vBForum', 'Forum', 'index',
			  $this->fetch_field('forumid'));

		return $result;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:22,代码来源:class_dm_forum.php


示例14: post_save_once

 public function post_save_once($doquery = true)
 {
     parent::post_save_once($doquery);
     require_once DIR . '/includes/adminfunctions_template.php';
     //print_rebuild_style(-1, '', 0, 1, 1, 0, false);
     build_style(-1, '', array('docss' => 0, 'dostylevars' => 1, 'doreplacements' => 0, 'doposteditor' => 0), '-1,1', '', false, false);
 }
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:7,代码来源:stylevar.php


示例15: save

 /**
  * Saves the data from the object into the specified database tables
  *
  * We change the default for $replace to true, and then call the parent.
  */
 function save($doquery = true, $delayed = false, $affected_rows = false, $replace = true, $ignore = false)
 {
     // We default $replace to true, and then call the parent.
     return parent::save($doquery, $delayed, $affected_rows, $replace, $ignore);
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:10,代码来源:class_dm_ip_data.php


示例16: foreach

 /**
  * Any code to run after deleting
  *
  * @param	Boolean Do the query?
  */
 function post_delete($doquery = true)
 {
     foreach ($this->lists['content'] as $contenttypeid => $list) {
         if (!($attach =& vB_Attachment_Dm_Library::fetch_library($this->registry, $contenttypeid))) {
             return false;
         }
         $attach->post_delete($this);
         unset($attach);
     }
     // Update the refcount in the filedata table
     if (!empty($this->lists['filedataids'])) {
         $this->registry->db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "filedata AS fd\n\t\t\t\tSET fd.refcount = (\n\t\t\t\t\tSELECT COUNT(*)\n\t\t\t\t\tFROM " . TABLE_PREFIX . "attachment AS a\n\t\t\t\t\tWHERE fd.filedataid = a.filedataid\n\t\t\t\t)\n\t\t\t\tWHERE fd.filedataid IN (" . implode(", ", array_keys($this->lists['filedataids'])) . ")\n\t\t\t");
     }
     // Below here only applies to attachments in pictures/groups but I forsee all attachments gaining the ability to have comments
     if ($this->info['type'] == 'filedata') {
         if (!empty($this->lists['filedataids'])) {
             $this->registry->db->query_write("\n\t\t\t\t\tDELETE FROM " . TABLE_PREFIX . "picturecomment\n\t\t\t\t\tWHERE filedataid IN (" . implode(", ", array_keys($this->lists['filedataids'])) . ")\n\t\t\t\t");
         }
     } else {
         if (!empty($this->lists['picturecomments'])) {
             foreach ($this->lists['picturecomments'] as $sql) {
                 if (!($results = $this->registry->db->query_first("\n\t\t\t\t\tSELECT a.attachmentid\n\t\t\t\t\tFROM " . TABLE_PREFIX . "attachment AS a\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t{$sql}\n\t\t\t\t"))) {
                     $this->registry->db->query_write("\n\t\t\t\t\t\tDELETE FROM " . TABLE_PREFIX . "picturecomment\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t{$sql}\n\t\t\t\t\t");
                 }
             }
         }
     }
     require_once DIR . '/includes/functions_picturecomment.php';
     foreach (array_keys($this->lists['userids']) as $userid) {
         build_picture_comment_counters($userid);
     }
     return parent::post_delete($doquery);
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:38,代码来源:class_dm_attachment.php


示例17: intval

	/**
	* Verifies the page text is valid and sets it up for saving.
	*
	* @param	string	Page text
	*
	* @param	bool	Whether the text is valid
	*/
	function verify_pagetext(&$pagetext)
	{
		if (empty($this->info['skip_charcount']))
		{
			if (!$this->fetch_field('type'))
			{
				trigger_error('vB_Datamanager_Blog_Custom_Block(): \'type\' must be set.', E_USER_ERROR);
			}
			if ($this->fetch_field('type'))
			{
				$maxchars = $this->registry->options['vbblog_blockmaxchars'];
			}
			else
			{
				$maxchars = $this->registry->options['vbblog_pagemaxchars'];
			}
			if ($maxchars != 0 AND ($postlength = vbstrlen($pagetext)) > $maxchars)
			{
				$this->error('toolong', $postlength, $maxchars);
				return false;
			}

			$this->registry->options['postminchars'] = intval($this->registry->options['postminchars']);
			if ($this->registry->options['postminchars'] <= 0)
			{
				$this->registry->options['postminchars'] = 1;
			}
			if (vbstrlen(strip_bbcode($pagetext, $this->registry->options['ignorequotechars'])) < $this->registry->options['postminchars'])
			{
				$this->error('tooshort', $this->registry->options['postminchars']);
				return false;
			}
		}

		return parent::verify_pagetext($pagetext, false);

	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:44,代码来源:class_dm_blog_custom_block.php


示例18: IF

 /**
  * Additional data to update after a save call (such as denormalized values in other tables).
  * In batch updates, is executed for each record updated.
  *
  * @param	boolean	Do the query?
  */
 function post_save_each($doquery = true)
 {
     if (!empty($this->info['update_existing'])) {
         // we're updating an existing attachment that has already been counted
         // in the thread/post.attach fields. We need to decrement those fields
         // because they will be incremented on save.
         $this->registry->db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "post SET\n\t\t\t\t\tattach = IF(attach > 0, attach - 1, 0)\n\t\t\t\tWHERE postid = " . intval($this->info['update_existing']));
         $this->registry->db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "post AS post, " . TABLE_PREFIX . "thread AS thread SET\n\t\t\t\t\tthread.attach = IF(thread.attach > 0, thread.attach - 1, 0)\n\t\t\t\tWHERE thread.threadid = post.threadid\n\t\t\t\t\tAND post.postid = " . intval($this->info['update_existing']));
     }
     ($hook = vBulletinHook::fetch_hook('attachdata_postsave')) ? eval($hook) : false;
     return parent::post_save_each($doquery);
 }
开发者ID:holandacz,项目名称:nb4,代码行数:18,代码来源:class_dm_attachment.php


示例19:

	/**
	* Verifies the page text is valid and sets it up for saving.
	*
	* @param	string	Page text
	*
	* @param	bool	Whether the text is valid
	*/
	function verify_pagetext(&$pagetext)
	{
		if (empty($this->info['skip_charcount']))
		{
			if ($this->registry->options['vbblog_usermaxchars'] != 0 AND ($postlength = vbstrlen($pagetext)) > $this->registry->options['vbblog_usermaxchars'])
			{
				$this->error('toolong', $postlength, $this->registry->options['vbblog_usermaxchars']);
				return false;
			}
		}

		return parent::verify_pagetext($pagetext);

	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:21,代码来源:class_dm_blog_user.php


示例20: set

 /**
  * Overriding version of the set() function to deal with the selecting userid from username
  *
  * @param	string	Name of the field
  * @param	mixed	Value of the field
  *
  * @return	boolean	Returns true on success
  */
 function set($fieldname, $value)
 {
     switch ($fieldname) {
         case 'username':
         case 'modusername':
             if ($value != '' and $userinfo = $this->dbobject->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE username = '" . $this->dbobject->escape_string($value) . "'")) {
                 $this->do_set('userid', $userinfo['userid']);
                 $this->info['user'] =& $userinfo;
                 return true;
             } else {
                 $this->error('no_users_matched_your_query_x', $value);
                 return false;
             }
             break;
         default:
             return parent::set($fieldname, $value);
     }
 }
开发者ID:benyamin20,项目名称:vbregistration,代码行数:26,代码来源:class_dm_moderator.php



注:本文中的vB_DataManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP vB_Image类代码示例发布时间:2022-05-23
下一篇:
PHP vB_Cache类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap