Introduction
Before you integrate PTA into your Pligg site you should know following:
- PTA is quite big addon with a lot of functionality, do not integrate if you do not know what it is or what it is good for
- PTA is independent (99%) on Pligg Code, in the other words your actual Pligg functionality should not be affected
- PTA addon installation requires basic knowledge of php and Pligg
- PTA requires Pligg version 9.5 or higher, integration between version 9.9 and lower versions is a little different
- PTA addon requires JQuery javascript library which IS NOT compatible with Javascript Effects Library included in Pligg (Striptaculos,Prototype..). You can not use both of them simultaneously
- PTA uses custom Simple messaging module, so you will have to enable this module in your admin panel
- PTA addon use INNODB Mysql Engine. If your provider uses very old version of mysql you cannot install necessary tables
Download team_files.zip. This archive contains all neccessary files to perform successful integration with Pligg. This pack contains not only team files but also a little customized Pligg files (customization is described in next phase). Despite fact packed files are already customized, I highly recommend to read Phase 2.
Phase 2 - Customization
STEP 1
Pligg PHP files:
html1.php
New in: if ($URLMethod ==1) {define_tables.php
New in: SetSmartyURLs($main_smarty) {Code:If ($x == "team") {return my_pligg_base."/team.php";} If ($x == "theteam") {return my_pligg_base."/team.php?id=".$var1;}
Please note:if you are using URL Method 2 do this in URLMethod 2, packed html1.php file is customized for default URL Method !!!Code:$main_smarty->assign('URL_team', getmyurl("team")); $main_smarty->assign('URL_theteam', getmyurl("theteam"));
We need to add reference to new Pligg database tables (tables creation is in phase 3).
Customization:
Code:<?php if(!defined('table_prefix')){ define('table_prefix',''); } if(!defined('tables_defined')){ define('table_categories', table_prefix . "categories" ); define('table_comments', table_prefix . "comments" ); define('table_friends', table_prefix . "friends" ); define('table_links', table_prefix . "links" ); define('table_trackbacks', table_prefix . "trackbacks" ); define('table_users', table_prefix . "users" ); define('table_tags', table_prefix . "tags" ); define('table_votes', table_prefix . "votes" ); define('table_pageviews', table_prefix . "pageviews" ); define('table_config', table_prefix . "config" ); define('table_modules', table_prefix . "modules" ); define('table_messages', table_prefix . "messages" ); define('table_formulas', table_prefix . "formulas" ); define('table_saved_links', table_prefix . "saved_links" ); define('table_totals', table_prefix . "totals" ); define('table_feeds', table_prefix . "feeds" ); define('table_feed_import_fields', table_prefix . "feed_import_fields" ); define('table_feed_link', table_prefix . "feed_link" ); define('table_misc_data', table_prefix . "misc_data" ); if(!defined('table_teams')){ define('table_teams', table_prefix . "teams" ); } if(!defined('table_tasks')){ define('table_tasks', table_prefix . "tasks" ); } if(!defined('table_membership')){ define('table_membership', table_prefix . "membership" ); } if(!defined('table_tasklinkship')){ define('table_tasklinkship', table_prefix . "tasklinkship" ); } if(!defined('table_taskcomments')){ define('table_taskcomments', table_prefix . "taskcomments" ); } if(!defined('table_taskrating')){ define('table_taskrating', table_prefix . "taskrating" ); } if(!defined('table_taskfiles')){ define('table_taskfiles', table_prefix . "taskfiles" ); } if(!defined('table_tasklinkship')){ define('table_tasklinkship', table_prefix . "tasklinkship" ); } if(!defined('table_shoutbox')){ define('table_shoutbox', table_prefix . "shoutbox" ); } if(!defined('table_team_logs')){ define('table_team_logs', table_prefix . "team_logs" ); } define('tables_defined', true); } ?>
STEP 2
LANGUAGES:
lang_english.conf
We need some basic info about teams in lang_english.conf in languages folder.
New:
Code:///////////////////TEAMS ADDON START///////////////////// //<SECTION>TEAMS_ADDON</SECTION><ADDED>1.0</ADDED> PLIGG_Visual_Teams = "Teams" //<SECTION>TEAMS_ADDON</SECTION><ADDED>1.0</ADDED> PLIGG_Visual_Add_Link_To_Team_Task = "Add link to team task" //<SECTION>TEAMS_ADDON</SECTION><ADDED>1.0</ADDED> PLIGG_Visual_Link_Task_Instruct = "Click on tasks you want to connect this link with:" //<SECTION>TEAMS_ADDON</SECTION><ADDED>1.0</ADDED> PLIGG_Visual_Insert_Link_To_Team_Task = "Insert to team task" //<SECTION>TEAMS_ADDON</SECTION><ADDED>1.0</ADDED> PLIGG_Visual_Loading_Wait = "Loading, please wait...." //<SECTION>TEAMS_ADDON</SECTION><ADDED>1.0</ADDED> PLIGG_Team_Tasklink_Already_Added = "Link is already connected with this task. " //<SECTION>TEAMS_ADDON</SECTION><ADDED>1.0</ADDED> PLIGG_Team_Tasklink_Error = "ERROR" //<SECTION>TEAMS_ADDON</SECTION><ADDED>1.0</ADDED> PLIGG_No_Team_Tasks_In="You are currently not member of any team which has some tasks" //<SECTION>TEAMS_ADDON</SECTION><ADDED>1.0</ADDED> PLIGG_Shoutbox_No_Text="No text sent!" //<SECTION>TEAMS_ADDON</SECTION><ADDED>1.0</ADDED> PLIGG_Shoutbox_Invalid_User="Not your ID!" //<SECTION>TEAMS_ADDON</SECTION><ADDED>1.0</ADDED> PLIGG_Shoutbox_Invalid_Team="It is not possible to send message to team your are not member." ///////////////////TEAMS ADDON END////////////////////////





task can contain links. To create connection between task and link we add to EACH link possibility to connect it with some specific task (of course only for logged in users because only them have authorization to access teams).
Linear Mode

