Hi
I get errors when trying to create code for add, edit and delete in AfterMM 0.1 because of the use of $this inside a function. The error produced for each starts:
Fatal error: Using $this when not in object context in
The functions that throw it up are:
function CreateEditAction() {
###########################################################################
# Create generic EDIT ACTION code
###########################################################################
$CreateEvents = $CreateEvents . "\$this->CreateEvent('" . $theModule . $UCFItem. "Edited');";
$RemoveEvents = $RemoveEvents . "\$this->RemoveEvent('" . $theModule . $UCFItem. "Edited');";
echo $this->ProcessTemplate('action.editSkeleton.tpl');
echo "";
}
function CreateAddAction() {
###########################################################################
# Create generic ADD ACTION code
###########################################################################
$CreateEvents = $CreateEvents . "\$this->CreateEvent('" . $theModule . $UCFItem. "Added');";
$RemoveEvents = $RemoveEvents . "\$this->RemoveEvent('" . $theModule . $UCFItem. "Added');";
echo $this->ProcessTemplate('action.addSkeleton.tpl');
echo "";
}
function CreateDeleteAction() {
###########################################################################
# Create generic DELETE ACTION code
###########################################################################
$CreateEvents = $CreateEvents . "\$this->CreateEvent('" . $theModule . $UCFItem. "Deleted');";
$RemoveEvents = $RemoveEvents . "\$this->RemoveEvent('" . $theModule . $UCFItem. "Deleted');";
echo $this->ProcessTemplate('action.deleteSkeleton.tpl');
echo "";
}
How should echo $this->ProcessTemplate('action.deleteSkeleton.tpl');, for example, be re-written to work within the function?
CMSMS: 1.6.7
ModuleMaker: 0.3.1
AfterMM: 0.1
Trevor.
AfterMM bug in Add, Edit and Delete sections
Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Let us know here.
Jump to
- Official Boards
- ↳ README FIRST!!!
- ↳ Announcements
- ↳ General Discussion
- Support Boards
- ↳ CMSMS Core
- ↳ Modules/Add-Ons
- ↳ Help Wanted (commercial)
- ↳ Translations
- Community Boards
- ↳ Tips and Tricks
- ↳ CMS Show Off
- ↳ Layout and Design (CSS & HTML)
- ↳ Feature ideas
- ↳ Developers Discussion
- ↳ The Lounge
- International Discussions
- ↳ Czech/Slovak - Česky/Slovensky
- ↳ Danish - Dansk
- ↳ Dutch - Nederlands
- ↳ Aankondigingen
- ↳ Tips en Trucs
- ↳ Vertalingen & Documentatie
- ↳ Hulp gezocht (commercieel)
- ↳ Finnish - Suomi
- ↳ French - Français
- ↳ German - Deutsch
- ↳ BITTE ZUERST LESEN !!!
- ↳ Ankündigungen
- ↳ Installation und Einstellungen
- ↳ Module und Tags
- ↳ Smarty-Tipps und -Tricks
- ↳ Layout und Design
- ↳ Suchmaschinenoptimierung (SEO)
- ↳ HowTo's
- ↳ Übersetzungen
- ↳ Show Off
- ↳ Hilfe gesucht (kommerziell)
- ↳ Stammtisch
- ↳ Hungarian - Magyar
- ↳ Italian - Italiano
- ↳ Moduli/Plugins
- ↳ Lithuanian - Lietuviškai
- ↳ Darbo / bendradarbiavimo pasiūlymai ir paieška
- ↳ Persian / Farsi
- ↳ Polish - Polski
- ↳ Portuguese - Português
- ↳ Russian - русский
- ↳ Предложения и поиск РАБОТЫ
- ↳ Spanish - Español
- ↳ Swedish - Svenska
- Geekmoot Editions
- ↳ Geekmoot 2016
- ↳ Connections and Conversations
- ↳ Geekmoot 2015
- ↳ Geek Moot 2012
- ↳ Locked: Geek Moot 2010
- Old Forums
- ↳ [locked] CMSMS 2.0 Beta
- ↳ Module Developers
- ↳ Closed Issues
- ↳ [locked] Documentation0ld
- ↳ Suggestions, Modifications & Corrections
- ↳ [locked] CMSMS 1.11 Beta
- ↳ Closed Issues
- ↳ [locked] CMSMS 1.10 Beta
- ↳ Closed Issues
- ↳ [locked] CMSMS 2.2 Beta
- ↳ [locked] CMSMS MLE fork
- ↳ Modules/Addon patchs
- ↳ [locked] Quality Assurance
- ↳ [locked] Accessability and Usability
- ↳ [locked] Documentation
- ↳ Media and presentations about CMSMS
- ↳ [locked] Installation, Setup and Upgrade