61
Antoine
Re: Custom Block - code help
  • 2005/6/23 17:19

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Hmm if I understand this correctly you are trying to directly link block code from your theme file?

The most correct way to make a block is to first setup your own module and then making a block inside this module.

I cannot go into all the details for making modules but in this case you should create your own directory under the /modules dir and it should contain a file named xoops_version.php looking like this:

$modversion['name'] = <name>;
$modversion['version'] = <version>;
$modversion['description'] = <description>;
$modversion['author'] = <author>;
$modversion['credits'] = <credits>;
$modversion['help'] = <help>;
$modversion['license'] = <license>;
$modversion['official'] = 0;
$modversion['image'] = "images/<an optional image to display in admin section>";
$modversion['dirname'] = <name of dir under modules>;

$modversion['hasAdmin'] = 0;
$modversion['hasMain'] = 0;

$modversion['blocks'][1]['file'] = <block filename>;
$modversion['blocks'][1]['name'] = <block name>;
$
$modversion['blocks'][1]['description'] = <description>;
$modversion['blocks'][1]['show_func'] = <function to invole to show render the block>;
$modversion['blocks'][1]['template'] = <any template file you might be using to render the block>;


This will basically setup a module with one block and without and admin or main stuff and provides a basic framework to install your block into XOOPS and manage it's display through teh configuration tools.

How to setup the rest is a bit too much to get into. Best read up and have a look at the sample XOOPS module if that's still available.



62
Antoine
Re: Display templates not in modinfo.php
  • 2005/6/22 17:57

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Ok, found the answer myself by experimenting with it.

Just specify the full path to the template in $xoopsTpl->display(<full_path_here>) without a db: prefix.



63
Antoine
Display templates not in modinfo.php
  • 2005/6/22 14:16

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


First of all: I used the search to look for an answer to this question and it came up with nothing. If this question has already been answered: Sorry!

I made a custom module that needs to be very flexible in what templates it can display. This cause these templates need to be able to be added and removed by someone that knows only HTML without having to update the modinfo.php file and do a refresh on the module every time.

Is there a way to display a template by file instead of by database entry using $xoopsTpl? For example:

$xoopsTpl->xoops_setCaching(0);
$xoopsTpl->display('file:'.$selected_template);

Thanks in advance.



64
Antoine
XoopsThemeForm and XoopsObject requests
  • 2005/6/21 16:27

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Hi I'd like to see the following in XoopsThemeForm and related classes:

1) An option to render the XoopsFormDhtmlTextArea without the smilies. Using a normal XoopsFormTextarea would also eliminate the use of features like the imagemanager and such. Smilies are not a popular feature when using XOOPS to design corporate websites for my clients.

Related:

2) In XoopsObject: Currently XOBJ_DTYPE_TXTAREA's smileys are rendered whenever doxcode is enabled, regardless of the dosmiley setting. However for corporate websites it is desirable to have the possibility to render markup elements like [b] and [i] but not render smilies. It would also be convenient if this could be set per variable instead of object-wide.



65
Antoine
Re: Administration link in User Menu
  • 2005/6/21 15:30

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Hmm, that's a bit of a problem with a module that doesn't have a 'public' part but only consists of an admin area...

Luckily this particular module is going to have one, just have to write it.

Thanks for the input.



66
Antoine
Administration link in User Menu
  • 2005/6/21 15:20

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Hi,

What am I missing here:

I've created a group that has administrative rights on one custom module. Made one user a member to that group besides being a member of registered users. This user does not have a link to the admin panel appear in his user menu for some reason so he has to manually go to XOOPS_URL/admin.php to be able to administer said module.

Any thoughts on how I can get this link to appear in his user menu?



67
Antoine
Re: Avatar Upload
  • 2005/6/20 21:02

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Got the same problem when using uplaoder.php's XoopsMediaUploader in a custom module I wrote for a XOOPS 2.0.10 site.
Looks like I will have to dive in and try to debug the problem myself. It's part of the fun (and frustration) of using XOOPS imho.
....
Ok here is the solution:

The XoopsMediaUploader does a case sensitive(!) compare to extensions in mimetypes.inc.php.

On line 181 in your /class/uploader.php file change:

$ext substr$this->mediaName$ext );


to:

$ext strtolower(substr$this->mediaName$ext ));


Problem solved, at least for me. Hope it'll help others too.



68
Antoine
Re: Xoops isnt working in ISAPI mode
  • 2005/1/27 0:41

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Phrase I caught on Dutch XOOPS site was:

Quote:

Do you get blank pages after installing XOOPS on a IIS server under Windows XP? This is because Apache and IIS handle some server variables differently. You can solve it by changing:

In common.php, replace the line prox 162:
Quote:

$xoopsRequestUri = $_SERVER[ 'REQUEST_URI' ];


with :
Quote:

$xoopsRequestUri = $_SERVER[ 'SCRIPT_NAME' ];

(Thanks to Shine)


Maybe it's irrelevant. If not: Guess it's worth a try.



69
Antoine
Re: How to Lock a Forum Topic?
  • 2005/1/27 0:38

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Have modrator rights and press the padlock image at the bottom of the page really.



70
Antoine
Re: Phone Book Module
  • 2005/1/27 0:30

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Lightweight Directory Access Protocol,

So basically something like SQL but just a wee bit different to us non-believers

See: LDAP

And the links given there.




TopTop
« 1 ... 4 5 6 (7) 8 9 10 11 »



Login

Who's Online

224 user(s) are online (145 user(s) are browsing Support Forums)


Members: 0


Guests: 224


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