i am working on an urgent project which involves implmentation of filestore of Agiletoolkit
i went through the doc here => http://agiletoolkit.org/doc/filestore
$f=$p->add('Form');
$c=$p->add('Controller_Filestore_File');
$c->setActualFields(array('id','filestore_type_id','filestore_volume_id','filename','filesize'));
$f->addField('upload','upload')->setController($c);
$p->add('H4')->set('Previously Uploaded Files');
$g=$p->add('MVCGrid')->setController($c);
$g->dq->limit(5)->order('id desc');
there is this example there
Questions:
Q1. I know i don't need to use MVCGrid addon here but why is it mentioend in this example? (its confusing me )
Q2. Filestore is a controller i get that .. so if i want it on multiple pages, do i add it in the API ?
Q3. If suppose i add something like that in api can i use it in all pages ? if yes then how ? $this->api-> WHAT ?
There was a small bug in filestore which is fixed now. So it should work fine. It was a bug in sql queries that were imported.
Related
I'm using the PHP V2 API. I requested full access (scope: https://www.googleapis.com/auth/drive). I also tried adding all of the different scopes to no avail.
I'm fully able to retrieve all files and list them but the thumbnail link is always null. Same with 'hasThumbnail'.
I tried the API explorer on https://developers.google.com/drive/v2/reference/files/get#examples and it shows me the thumbnail links correctly.
The relevant code can be boiled down to this:
$drive = new Google_Service_Drive($this->client);;
$files = $drive->files->listFiles($parameters)->files;
This is the response from the API explorer.
The response from my code (for the same ID) is:
Found the solution. It took 5 hours to run into this such simple solution.
Not many fields show by default, you must specify which fields you want populated.
The modified basic query now is:
$this->drive->files->listFiles([
'fields' => 'nextPageToken, files(thumbnailLink, webViewLink)'
])->files;
I would like to create a campaign using Facebook API. I tried to run all available example without success.
First of all I created an App in order to have a APP_ID and a APP_SECRET.
I did all the procedure to add my Ad_account following the tutorial.
I downloaded all the SDK to facilitate Facebook API use like:
facebook-php-ads-sdk and run adgroup_creation.php and curl_log.php with my data, without success.
facebook-php-sdk-v4 I suppose it is less specific than the previous one.
Multi-Product Ads with the Facebook Marketing POST -> developers.facebook.com/ads/blog/post/2015/03/26/creating-multi-product-ads/
the developers reference -> developers.facebook.com/docs/reference/php/4.0.0
I used "Composer" to get all dependency.
In all this case I had problem to create a campaign using more or less this code:
$campaign = new \FacebookAds\Object\AdCampaign(null,"act_$ACCOUNT_ID");
$campaign->setData(array(
AdCampaignFields::NAME => 'My First Campaign',
AdCampaignFields::OBJECTIVE => AdObjectives::WEBSITE_CLICKS,
AdCampaignFields::STATUS => AdCampaign::STATUS_PAUSED ));
// PROBLEM is Here
$campaign->create();
Any help? How can I get a more useful error?
It's difficult to help without knowing the exact error. However, you could try this: before creating your campaign, initialize the API using:
Api::init(<your_app_id>, <your_ap_secret>, <your_token>);
(You need to load FacebookAds\Api to use this function).
For the past few days I'm struggling with the RAP API library.
Basically I've created an custom ontology which I want to use with this library, as they state it supports to work with ontologies.
But the load() method from the library generates some weird OntModel.
This is the code where I try to load my ontology:
$client = ModelFactory::getOntModel (MEMMODEL,OWL_VOCABULARY);
$client->load("myOntology.owl");
$querystring = '
SELECT ?model
WHERE ( ?Brand, <http://www.owl-ontologies.com/proj.owl#hasModel>, ?model )';
$result = $client->rdqlQuery($querystring);
rdqlEngine::writeQueryResultAsHtmlTable($Result);
Can someone help me ? On the RAP API library documentation they have an example describing only how to create an ontology, not how to read one from an file(or external URI).
Thanks in advance.
Later Edit
Here is the OntModel which was loaded: OntModel
Open Ontology in Protege and save it as "RDF/XML" instead of "OWL/XML" as I had done initially.
I try to sort records returned by the get_entry_list rest api method, and it doesn't working.
Request JSON:
{
"session":"mj95dgk1ldtd2m96u02oj0u3r2",
"module_name":"Accounts",
"query":"accounts.name LIKE 'Air%'",
"order_by":"accounts.name desc",
"offset":0,
"select_fields":[
],
"link_name_to_fields_array":"",
"max_result":100,
"deleted":0,
"favorites":false
}
I'm using api version 4.1.
Results are not sorted even using ASC or DESC sorting method.
Manage to solve the problem based on this link
https://web.sugarcrm.com/support/issues/806c9fb3-6712-abd6-3106-5287d5398699
Proposed fix:
in service/v4/SugarWebServiceUtilv4.php
Around line 89: remove or comment the following line:
$order_by=$seed->process_order_by($order_by, null);
It certainly would be better to fix that in SugarBean.php (process_order_by) where the following test was removed:
if (strchr($value,'.') === false)
it seems like this is bug in sugar crm ( Bug :59526 ) .
order by not working with web service
But you can also fetch the record by creating your own method for Api , i hope this helps !
I am looking for a way to search issue based on summary in Jira.
There are couple of functions to search issue, the one i need is "getIssuesFromTextSearchWithProject" but when i use it, it does not return issues just from that project but returns related issues from all projects.
Any ideas? I am doing this in PHP.
$result = $soap->getIssuesFromTextSearchWithProject($authtoken,"PROJECT_NAME", "Search String",10);
My Fault :
Project name needs to be array of projects :(
So this worked :
$projects = array("PROJECT_NAME");
$result = $soap->getIssuesFromTextSearchWithProject($authtoken,$projects, "Search String",10);