1
|
|
|
<?php |
|
|
|
|
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* |
5
|
|
|
* Module: SmartPartner |
6
|
|
|
* Author: The SmartFactory <www.smartfactory.ca> |
7
|
|
|
* Licence: GNU |
8
|
|
|
*/ |
9
|
|
|
// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
|
|
|
|
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* This does not belong here. However, since some admin.php constants are refereing to constants |
13
|
|
|
* defined in common.php, and since admin.php is automatically include when including mainfile.php |
14
|
|
|
* we need to include the common language file here. |
15
|
|
|
* |
16
|
|
|
* For next release: remove all reference to common constants in other language files. |
17
|
|
|
*/ |
18
|
|
|
// including the common language file |
19
|
|
|
$fileName = XOOPS_ROOT_PATH . '/modules/smartpartner/language/' . $GLOBALS['xoopsConfig']['language'] . '/common.php'; |
20
|
|
|
if (file_exists($fileName)) { |
21
|
|
|
include_once $fileName; |
22
|
|
|
} else { |
23
|
|
|
include_once XOOPS_ROOT_PATH . '/modules/smartpartner/language/english/common.php'; |
24
|
|
|
} |
25
|
|
|
|
26
|
|
|
define('_MD_SPARTNER_ADMIN_PAGE', ':: Admin Section::'); |
27
|
|
|
define('_MD_SPARTNER_NOPARTNERSELECTED', 'You did not select a valid partner.'); |
28
|
|
|
define('_MD_SPARTNER_NOTIFY', 'Notify on approval'); |
29
|
|
|
define('_MD_SPARTNER_READMORE', 'Read more...'); |
30
|
|
|
define('_MD_SPARTNER_SUBMIT_ERROR', 'An error occured while submitting the partner.'); |
31
|
|
|
define('_MD_SPARTNER_SUBMIT_SUCCESS', 'The partner was successfully submitted.'); |
32
|
|
|
define('_MD_SPARTNER_DETAIL_CAT', 'View all partners of this category'); |
33
|
|
|
define('_MD_SPARTNER_EDIT', 'Edit'); |
34
|
|
|
define('_MD_SPARTNER_DELETE', 'Delete'); |
35
|
|
|
define('_MD_SPARTNER_JOIN', 'Become a Partner'); |
36
|
|
|
define('_MD_SPARTNER_PARTNERS', 'Partners'); |
37
|
|
|
define('_MD_SPARTNER_PARTNERSTITLE', 'The partners of '); |
38
|
|
|
define('_MD_SPARTNER_PARTNER', 'Partner'); |
39
|
|
|
define('_MD_SPARTNER_DESCRIPTION', 'Description'); |
40
|
|
|
define('_MD_SPARTNER_HITS', 'Hits'); |
41
|
|
|
define('_MD_SPARTNER_NOPART', 'There is currently no partner to display.'); |
42
|
|
|
//file join.php |
43
|
|
|
define('_MD_SPARTNER_IMAGE', 'Logo'); |
44
|
|
|
define('_MD_SPARTNER_TITLE', 'Name'); |
45
|
|
|
define('_MD_SPARTNER_URL', 'Web site:'); |
46
|
|
|
define('_MD_SPARTNER_SEND', 'Send the request'); |
47
|
|
|
define('_MD_SPARTNER_ERROR1', 'You did not fill the form correctly. Please try again.'); |
48
|
|
|
define('_MD_SPARTNER_ERROR2', "<div style=\"text-align: center;\">Image size is larger than 110x50. <a href='javascript:history.back(1)'>Try with another image</a></div>"); |
49
|
|
|
define('_MD_SPARTNER_ERROR3', "<div style=\"text-align: center;\">The image file doesn't exist. <a href='javascript:history.back(1)'>Try with another image</a></div>"); |
50
|
|
|
define('_MD_SPARTNER_GOBACK', "<a href='javascript:history.back(1)'>Back</a>"); |
51
|
|
|
define('_MD_SPARTNER_NEWPARTNER', '%s Partners Request'); |
52
|
|
|
define('_MD_SPARTNER_SENDMAIL', "Request mail sent to the administrator.<br><a href='index.php'>Return to index</a>"); |
53
|
|
|
define('_MD_SPARTNER_CATEGORY_EMPTY', 'This category is empty.'); |
54
|
|
|
|
55
|
|
|
// Hack by marcan: More information on the SmartPartner module |
56
|
|
|
define('_MD_SPARTNER_INTRO_TEXT', 'Here is the list of our prefered partners. You can access their web site by clicking on their logo'); |
57
|
|
|
define('_MD_SPARTNER_INTRO_JOIN', 'You would like to become a partner of %s? Fill out the following form and we will contact you as soon as possible.'); |
58
|
|
|
define('_MD_SPARTNER_TITLE_DSC', 'Your organisation name'); |
59
|
|
|
define('_MD_SPARTNER_IMAGE_DSC', 'Your logo address'); |
60
|
|
|
define('_MD_SPARTNER_URL_DSC', 'Your web site'); |
61
|
|
|
define('_MD_SPARTNER_DESCRIPTION_DSC', 'Description of your organisation'); |
62
|
|
|
define('_MD_SPARTNER_BACKTOINDEX', 'Back to partners index'); |
63
|
|
|
define('_MD_SPARTNER_OFFER_INTRO', 'Offer list'); |
64
|
|
|
|
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.