How to change Date Format in DOCman 2.0 RC 1 - joomla

How can I change date format in joomla module named DOCman?
Currently it look like:
"Wednesday, 25 September 2013"
and i want something like this:
"25-09-2013"
Thanks in advance.
ps: I tried this but it is for older version
http://www.alexwalker.co.uk/joomla-solutions/6-how-to-change-date-format-in-docman

Found it!
it's located in: ...\components\com_docman\views\list\tmpl\table.php
line number: 176
Change to:
<?= #date(array('date' => $document->publish_date, 'format' => '%d.%m.%Y (%H:%M:%S)' )); ?>
Result:
25.09.2013 (23:42:53)
:)

The last time I checked with the developers of DOCman about this, this was not possible due to a bug. It is due to be fixed for RC2.

Related

Testlink Installation problem with $tlCfg->results['status_code'] = array (

I am installing Testlink on a fairly vanilla laptop using XAMPP v3.3.0 and using testlink 1.8.5b and/or 1.9.0.
I am unable to find support online and the below is my error message that I get on both versions of Testlink that I have tried:
Fatal error: Uncaught Error: Attempt to modify property "results" on null in C:\Program Files\XAMPP\htdocs\testlink\cfg\const.inc.php:360 Stack trace: #0 C:\Program Files\XAMPP\htdocs\testlink\install\index.php(11): require_once() #1 {main} thrown in C:\Program Files\XAMPP\htdocs\testlink\cfg\const.inc.php on line 360
I receive this error once I start Xampp and going to http://localhost/testlink/install/index.php this is before I even get the Testlink installation window.
I have not yet made the changes to the directories in config.inc.php. At this point I have created the MySql user as advised via documentation but this occurs even before the creation of the user.
My config files everywhere is untouched across xampp and Testlink, and on Xampp Apache and MySQL (Tomcat) starts just fine.
Any advise that I might be missing?
Thank you in advance
there is some issue that I also cannot indicate, but i try to download a different version or fix the version at https://github.com/TestLinkOpenSourceTRMS/testlink-code/tree/testlink_1_9_20_fixed
seems this code is successful in setup testlink. I try some workaround in your issue because it's similar to the issue that I had but no luck to make it.
I speak Spanish, sorry for the English.
Solution:
Enter the file "..\testlink\cfg\const.inc.php" and locate line 360, it should look something like this:
$tlCfg->results['status_code'] = array (
'failed' => 'f',
'blocked' => 'b',
'passed' => 'p',
The problem is that the object was not previously initialized, for this we must place the following line of code to initialize the object and then be able to call it:
$tlCfg = new stdClass();
Now it should look something like this:
$tlCfg = new stdClass();
$tlCfg->results['status_code'] = array (
'failed' => 'f',
'blocked' => 'b',
'passed' => 'p',
You save and try, greetings and I hope I have helped.

Plone date translations broken

Somehow after running buildout and restarting my website, dates translations are not correct. I receive 28 month_aug_abbr 2015, not 28 Aug 2015.
When this happens I usually check zope.conf.
It should include this environment variables:
PTS_LANGUAGES it en
LANG it_IT.utf8
TZ Europe/Rome
zope_i18n_compile_mo_files true
You can configure them with buildout doing something like this:
[instance-settings]
environment-vars +=
PTS_LANGUAGES it en
LANG it_IT.utf8
TZ Europe/Rome
zope_i18n_compile_mo_files true
If you use complex buildouts you should pay attention to the presence of lines with "environment-vars =" (note the missing + before the equal): they may override your modification.
Use ./bin/buildout annotate to debug your buildout.

Laravel[PAYPAL] annoying issue with PayPal SDK config fix

I'm trying to create a laravel wrapper for paypal sdk, but could not continue due to the annoying fact that as a developer we should edit this
vendor/paypal/sdk-core-php/lib/../config/sdk_config.ini
Is there anyway in the paypal SDK to easily change the config.ini without compromising the structure.
I'm trying not to touch the /vendor/ folder as much as possible.
Or should i create a filesystem editor in my functions that would create an sdk_config.ini for Paypal SDK?
Any concepts?
Yes with old version like sdk 1.4.0 you can do it by declaring sdk_config path , see paypal documentation
I got same issue too, found some error on code after updating the sdk. post an issue on Paypal-sdk
https://github.com/paypal/SDKs/issues/51
hope it helps
In Composer:
Check composer.json be sure you have:
"paypal/rest-api-sdk-php" : "*"
If you have a different string change it and run composer update.
In your php code:
So now you should be able to inject the configuration in the following way:
$cred = new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']);
$this->_api_context = new ApiContext($cred);
$this->_api_context->setConfig($paypal_conf['settings']);
Where $paypal_conf is:
array:3 [▼
"client_id" => "..."
"secret" => "..."
"settings" => array:5 [▼
"mode" => "sandbox"
"http.ConnectionTimeOut" => 30
"log.LogEnabled" => true
"log.FileName" => "./storage/logs/paypal.log"
"log.LogLevel" => "FINE"
]
]

what is the difference between stensi & WanWizard datamaper versions?

I've tried stensi but I see it has some mistakes and unexpected output as mentioned in the user guide.
For example, when trying to delete a record it gives this error:
$p=new Per();
$p->where('id',1)->get();
$p->delete();
with an error message of:
undefined index id
when
echo $p->UserName;
outputs:
mhmd
and WanWizard has also this error:
<h4>A PHP Error was encountered</h4>
<p>Severity: Warning</p>
<p>Message: array_key_exists() expects parameter 2 to be array, boolean given</p>
<p>Filename: libraries/datamapper.php</p>
<p>Line Number: 399</p>
How can I overcome these errors or what can I do to make it work properly?
I've changed the two lines of code at ../libraries/datamapper.php line 399 (WanWizard version):
$d = array($this->config->item('datamapper'));
DataMapper::$config = $d;
and the error message disappeared.
If anyone has tried DataMapper and has a better suggestion, please let us know.
just found out this error can occur if you autoload the datamapper config file
Stensi's original version hasn't been maintained since 2007, and only supports CI 1.4. Not really an option anymore these days. It was forked by Overzealous in 2008, and I took over maintenance of that fork in 2010.
I fixed this (in the CI spark version) by moving the config file from the sparks directory to the /application/config directory.
There's something strange happening in CI v2.1.4 where
$this->config->load('datamapper', TRUE, TRUE);
on line 391 of application/libraries/datamapper.php in Datamapper-ORM v1.8.2.1 isn't "namespacing" the config correctly. If you do
print_r ($this->config); die;
just after line 391, you'll see all of the config values are in the general CodeIgniter "namespace" inside the loaded config array. The least intrusive way to get around this is to manually namespace your application/config/datamapper.php file yourself, by changing all the references from
$config['prefix'] = '';
$config['join_prefix'] = '';
...
to
$config['datamapper']['prefix'] = '';
$config['datamapper']['join_prefix'] = '';
...
That's how I got around it. Though #Mhmdgomma's fix does work, I prefer not to hack the core of the system when there is a simpler solution available. Someone should probably get the maintainers to fix this, but I'm not sure where the issue lies. It looks more like it's a CI issue, rather than DM.

Magento: How do I debug if class_exist

In Magento I am getting the error
'Model class does not exist: Cerulean_School_Model_Observer'
However I clearly have the file:
$ ls -l app/code/local/Cerulean/School/Model/Observer.php
-rw-r--r-- 1 vyom webuser 877 Oct 24 02:27 app/code/local/Cerulean/School/Model/Observer.php
I have no idea on how to debug this.
Open up that file and see if it really states
<?php class Cerulean_School_Model_Observer
and if it really exists then you can do for testing
<?php $test = new Cerulean_School_Model_Observer();
and every time you encounter a new framework , app with a structure you should familiarize with naming conventions as a first step that helps you understand the structure
you should follow http://framework.zend.com/manual/en/coding-standard.naming-conventions.html

Resources