51
dejadingo
Re:Why isn't smarty used in admin scripts
  • 2004/11/29 18:56

  • dejadingo

  • Just popping in

  • Posts: 71

  • Since: 2004/10/22


The magic bullet!
Thanks a million ...



52
dejadingo
Re:Why isn't smarty used in admin scripts
  • 2004/11/29 18:23

  • dejadingo

  • Just popping in

  • Posts: 71

  • Since: 2004/10/22


Interesting that what Mithrandir recommended is exactly what I tried, but the template never displayed. I still don't understand what is missing.

I have
include '../../../include/cp_header.php';

function 
eventAdmin($status=0)
{
    
$xoopsDB =& Database::getInstance();
    
$myts =& MyTextSanitizer::getInstance();
    
xoops_cp_header();
        if (!isset(
$xoopsTpl)) {
          
$xoopsTpl = new XoopsTpl();
        }
    
$xoopsOption['template_main'] = 'smarty_AdminListForm.html';

    
$xoopsTpl->assign('lang_title'_MI_DJE_ADMINTITLE);
        ...
blah-blah-blah...
        
xoops_cp_footer();
}

and no content appears inside the addmin theme wrapper.

Should I just give up on this until XOOPS 2.1?



53
dejadingo
Re:Why isn't smarty used in admin scripts
  • 2004/11/29 8:45

  • dejadingo

  • Just popping in

  • Posts: 71

  • Since: 2004/10/22


Great, thanks - I'll try this.

Where I was stuck was
xoops_cp_header();
if (!isset(
$xoopsTpl)) {
   
$xoopsTpl = new XoopsTpl();
}
$xoopsOption['template_main'] = 'mymodule_admin.html';
include 
XOOPS_ROOT_PATH."/header.php";

ie. setting the admin header, followed by setting the template, followed by including the main XOOPS header.

In particular it seemed that including the main header file was a conflict with using xoops_cp_header() to set up the page theme for admin work.

Thanks again.



54
dejadingo
Re:Why isn't smarty used in admin scripts
  • 2004/11/29 2:44

  • dejadingo

  • Just popping in

  • Posts: 71

  • Since: 2004/10/22


Seems like it's much more complicated than it should be to do this. I had my templates working outside the admin section of my module and now I want to put them under admin.

The big problem is that the admin area usually does not use the main XOOPS header file (AgendaX seems to be the exception here). So I had to find where XoopsTpl is being created/initialized and add that code to my header. However that is not enough.

- My admin header/footer display correctly.
- I can trace (with echo statements) down to the end where the template should activate.
- I can view the template through System Admin >> Templates
- I have updated my module as well as doing an uninstall/reinstall

The templates just don't work when invoked inside MyModuleDir/admin/index.php. I am running up against my deadline and getting very frustrated.

Any help would be greatly appreciated.



55
dejadingo
HowTo - Restrict admin functions of modules by group
  • 2004/11/28 18:10

  • dejadingo

  • Just popping in

  • Posts: 71

  • Since: 2004/10/22


Can anyone help me figure out how to restrict access to the admin functions for a module based on the user_group in a user friendly way? I don't want my site maintenance group to have access to things like Preferences, etc.

When logged in as a Site Maintenance User the System Admin functions all display in the drop-down list, but no matter what you select - the system admin menu comes up with only the allowed functions available. This is fine. I don't particularly care if they see the others, just can't select them.

It seems that most (but not all) undesirable functions on the drop-down list for my installed modules go to the System Admin menu when selected. A few go off to the "you are not authorized" error screen and then pop back to the "edit your user details" screen. Not very friendly. I would like to get the same kind of menu as for System Admin, but for the module.

And that basic menu for the module does not seem to exist for the modules I am using. Where is it / should it be implemented?

Thanks for any help.



56
dejadingo
Recommendation for a photo gallery?
  • 2004/11/20 3:59

  • dejadingo

  • Just popping in

  • Posts: 71

  • Since: 2004/10/22


Can anyone recommend a module for a simple photo gallery where only an administrator can upload files or create albums?

My test server is Windows 2000, but the production server will be a Unix box. When I tried to install XoopsGallery and xcGallery, they both gave out a bunch of warnings.

Also there seems to be a dependency on some external software for the thumbnail images? I don't have a lot of experience with managing images this way, so I don't quite understand what is required here? Is my service provider likely to have these packages installed?

Thanks.



57
dejadingo
Re: phpMyAdmin can't show multiple DBs
  • 2004/11/18 17:30

  • dejadingo

  • Just popping in

  • Posts: 71

  • Since: 2004/10/22


Fantastic!
Works great - thanks.



58
dejadingo
phpMyAdmin can't show multiple DBs
  • 2004/11/17 19:48

  • dejadingo

  • Just popping in

  • Posts: 71

  • Since: 2004/10/22


With phpMyAdmin 2.6.0-pl1 and MySQL 4.0.18-nt running on localhost as root@localhost, I can only get it to show me the first database I created.

This is a test server I use for several sites I'm building/managing and I now have several databases. It was a minor annoyance until now, but I really need to look into the table contents of the newest database I created.

Anyone have any ideas?
Thanks.



59
dejadingo
Re: What if i Changed Hosting?
  • 2004/11/17 19:42

  • dejadingo

  • Just popping in

  • Posts: 71

  • Since: 2004/10/22


It's probably posted somewhere else (can't find it right now), but don't you also have to restore your database to the new server location?

I'd really appreciate basic instructions for doing this -- or a pointer to where they are already listed -- since I will need them to move from my test site to the official production site.

Thanks.



60
dejadingo
[multiMenu] menu/sub-menu titles by language?
  • 2004/11/16 2:52

  • dejadingo

  • Just popping in

  • Posts: 71

  • Since: 2004/10/22


Is there a way to specify the menu or sub-menu titles using the language constants, or will it only take hard coded strings?




TopTop
« 1 ... 3 4 5 (6) 7 »



Login

Who's Online

111 user(s) are online (62 user(s) are browsing Support Forums)


Members: 0


Guests: 111


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits