31
Dhurgan
Re: Updating templates...
  • 2004/6/4 11:55

  • Dhurgan

  • Just popping in

  • Posts: 68

  • Since: 2004/2/11


Quote:

Mithrandir wrote:
You could use the template manager to edit the templates directly. Then when you are satisfied with how it looks, you can copy-paste the contents from the template manager to the actual file.


Thats not a nice way to work, I prefer sitting in my editors with sources and update, test and reupdate... om the developer webserver.

You cant really test it without using XOOPS and you need XOOPS in some kind of developers mode to do it properly... same actually goes for the MySQL part, but at least, there I can buff the tables by hand until I'm done.



32
Dhurgan
Re: Updating templates...
  • 2004/6/4 11:43

  • Dhurgan

  • Just popping in

  • Posts: 68

  • Since: 2004/2/11


Do I have to clone the default set to edit my own provisioned module templates? Why not just a update from source button in the manager?

I can understand the default templates being uneditable, but add on modules? Ah well, So after installing XOOPS the first thing to do if your interested in developing is to clone the default.

Still, that means I have to write my template localy and upload it or edit in the browser which is a last-ditch way to maintain it in my eyes. Why not simply an update from source button in there to, definitly room for it :-/



33
Dhurgan
Updating templates...
  • 2004/6/4 8:12

  • Dhurgan

  • Just popping in

  • Posts: 68

  • Since: 2004/2/11


Another basic one perhaps?

Is there a way to update a template without having to update the whole module?

Reason is that the module update will reiinit all the other variables as well and after a few reloads the index eats away :-/ It's just on my development site, but still... seems like an awful waste of indexes when I only need to refresh the template in the db.

Looking in the template management I can download it, but there doesnt seem to be a way ti upload it (beside doing the MySQL by hand of course)



34
Dhurgan
Multiple templates in one script possible?
  • 2004/6/4 8:09

  • Dhurgan

  • Just popping in

  • Posts: 68

  • Since: 2004/2/11


Hi,

Probably a basic question but...

Since I, according to the documentation and code examples, have to specify the template before I include the header..i.e.

Quote:
$xoopsOption['template_main'] = 'files_submit.html';
include XOOPS_ROOT_PATH . "/header.php";

Is it possible to overide this later?
Why?
I would like to use different templates depending on what part of the code I'm running. I can solve this by having the template sort that out, but it would be quite convinient to be able to set the specific template when I decided what I need to do.
i.e.
Quote:
switch ($mode){
case 'update':
$xoopsOption['template_main'] = 'files_update.html';
break;
case 'manage':
$xoopsOption['template_main'] = 'files_manage.html';
break;
}


or even just...
Quote:
$xoopsOption['template_main'] = "files_".$mode.".html";



Would that be a "supported" method?



35
Dhurgan
Re: using templates in admin
  • 2004/4/28 8:17

  • Dhurgan

  • Just popping in

  • Posts: 68

  • Since: 2004/2/11


Yes, the dev.xoops.org docs are much better, although they could use a pretty print button

Concerning errors in the templates, you could use the db engine to fix that, i.e. phpMyAdmin and go directly to the problem. Although I do see your point.

Not that core admin code need to use the templates then, but add on modules sure could.




36
Dhurgan
Re: using templates in admin
  • 2004/4/28 6:26

  • Dhurgan

  • Just popping in

  • Posts: 68

  • Since: 2004/2/11


Thanks for that link, I will look there.

I've looked at the latest documentation here, the visual introduction, it sure is a helpful documentation to use XOOPS "as is" after an installation.

I will look at the dev.xoops wiki, if its the same as here its not much, but if theres more there...

I dont mind to wade through sourcecode to find out things, but I dont think I should have to, it timeconsuming and means I have to figure out what goes where in calls and why instead of getting an API to follow. I resent having to spend the little time I have researching how others coded the stuff I'm supposed to use when they, who did the code, could easliy have documented it in the first place and made their intentions clear.

For an easy example, the XoopsForm* functions... all thats available is the "huge" png really, and lots of code to wade through... I more or less made my own documentation to be able to use it, same goes for all the object calls of the user object.

For a good example on HOW i could be done, the very simple documentation that smarty itself comes with is more then enough to make coding it very simple.

Maybe dev.xoops has something...



37
Dhurgan
Re: irritating with inconsistant xoops_version.php
  • 2004/4/26 18:13

  • Dhurgan

  • Just popping in

  • Posts: 68

  • Since: 2004/2/11


Quote:

Dave_L wrote:
The language strings used in xoops_version.php should all start with _MI_XXXX, where XXXX is the module name.

I know the module naming convention, what I ment was that the convention makes for long names, and with a short space for it it makes it unflexible.

Quote:
The quotes ('') are needed because in those cases, the name of the constant has to be stored in the array. In other places, the value of the constant needs to be stored. But I agree that it's inconsistent.

In other words, its a perk of PHP? Well, I guess I'll have to live with that then...

Quote:
The maximum length is determined by the width of the database column(s) that stores it. I thought that was 32, but I just checked, and the width appears to be 30.

Well, I can probably adjust that then, but I have to check so that no classes use that limit first



38
Dhurgan
Re: using templates in admin
  • 2004/4/26 15:28

  • Dhurgan

  • Just popping in

  • Posts: 68

  • Since: 2004/2/11


guessed as much...

*sigh* they state HOW to code and the exact number of spaces to use while indenting (not that many modules follows it ) and its in the doc that you should use templates and naming conventions...

sadly not many examples of code shot it being used and the documentation basically isnt existing.

Anyone that can recommend a module that does this nicely?
I am trying to code to their standards...



39
Dhurgan
Re: irritating with inconsistant xoops_version.php
  • 2004/4/26 15:23

  • Dhurgan

  • Just popping in

  • Posts: 68

  • Since: 2004/2/11


from using it

_MI_CHALLENGE_ICONRESOLUTION_DESC

will not display its content when used as a config desc

_MI_CHALLENGE_ICONRES_DESC

will

I havent tested exactly when it doesnt show it anymore but it wont show the 33 char one when used via xoops_version.php and a config description or name

So it might be that its the config database that cant handle it, not the define itself.

Xoops 2.0.6



40
Dhurgan
using templates in admin
  • 2004/4/26 15:09

  • Dhurgan

  • Just popping in

  • Posts: 68

  • Since: 2004/2/11


I tried to find an module admin section that used templates, but those seems hard to find.

Any special reason for that?

Learning a lot about XOOPS kernel and classes lately...




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



Login

Who's Online

208 user(s) are online (133 user(s) are browsing Support Forums)


Members: 0


Guests: 208


more...

Donat-O-Meter

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

Latest GitHub Commits