1
edooper
Problem adding template file
  • 2004/7/30 13:03

  • edooper

  • Just popping in

  • Posts: 4

  • Since: 2003/6/5 1


Hi,

I'm stuck trying to add a single template file to a theme set, and I don't know if it's just me being stupid. Forgive me if I mix up terminology, I find the whole template/theme thing quite confusing.

This is what I try to accomplish: I want to add a template file called mydownloads_recent.html to the mydownloads module.
This is what I did: I cloned the theme set, downloaded it, added the html file, packed it up and uploaded it in the theme manager. It shows up yellow, with a generate button. So far so good. If I press Generate, it tells me "Selected file does not exist)". The ) is not a typo.
If I try and upload the single html file then I get the error message "Template file mydownloads_frontpage.html does not need to be installed (PHP files using this template file does not exist)".

Now what does the error message mean? Is this the proper way to add a template file or is there another way? Am I missing something? All references in the documentation only mention modifying template files, not adding them.

Can someone point me in the right direction? This shouldn't be this hard, I think.

Thanks,

Erik

2
Catzwolf
Re: Problem adding template file
  • 2004/7/30 13:06

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Did you add this new template to xoops_version.php? Have a look at this file for blocks[]

3
edooper
Re: Problem adding template file
  • 2004/7/30 13:09

  • edooper

  • Just popping in

  • Posts: 4

  • Since: 2003/6/5 1


Yes, I did. I added the following lines:

$modversion['templates'][11]['file'] = 'mydownloads_frontpage.html';
$modversion['templates'][11]['description'] = '';


Is there anything else I need to add? Or should I place the file in the blocks dir?

Thanks,
Erik

4
Catzwolf
Re: Problem adding template file
  • 2004/7/30 13:15

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Quote:

edooper wrote:
Yes, I did. I added the following lines:

$modversion['templates'][11]['file'] = 'mydownloads_frontpage.html';
$modversion['templates'][11]['description'] = '';


Is there anything else I need to add? Or should I place the file in the blocks dir?

Thanks,
Erik


Did you save this new template in the mydownloads/template/ directory? Because it sound like you did not. XOOPS needs this file and the fact that it says the file does not exsit make me think its not there

5
edooper
Re: Problem adding template file
  • 2004/7/30 13:22

  • edooper

  • Just popping in

  • Posts: 4

  • Since: 2003/6/5 1


Catzwolf wrote:
Quote:

Did you save this new template in the mydownloads/template/ directory? Because it sound like you did not. XOOPS needs this file and the fact that it says the file does not exsit make me think its not there


I did (first thing I checked

slaserver:erik:/var/www/html/modules/mydownloads/templatesls
blocks
/                      [b]mydownloads_frontpage.html[/b]  mydownloads_recent.html      mydownloads_viewcat.html
index
.html                   mydownloads_index.html      mydownloads_singlefile.html
mydownloads_brokenfile
.html  mydownloads_modfile.html    mydownloads_submit.html
mydownloads_download
.html    mydownloads_ratefile.html   mydownloads_topten.html
slaserver
:erik:/var/www/html/modules/mydownloads/templates$


I suspect that my XOOPS installation suffers from decay, but unfortunately upgrading is not an option at this time...

Erik

6
Catzwolf
Re: Problem adding template file
  • 2004/7/30 13:31

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Quote:

edooper wrote:
Catzwolf wrote:
Quote:

Did you save this new template in the mydownloads/template/ directory? Because it sound like you did not. XOOPS needs this file and the fact that it says the file does not exsit make me think its not there


I did (first thing I checked

slaserver:erik:/var/www/html/modules/mydownloads/templatesls
blocks
/                      [b]mydownloads_frontpage.html[/b]  mydownloads_recent.html      mydownloads_viewcat.html
index
.html                   mydownloads_index.html      mydownloads_singlefile.html
mydownloads_brokenfile
.html  mydownloads_modfile.html    mydownloads_submit.html
mydownloads_download
.html    mydownloads_ratefile.html   mydownloads_topten.html
slaserver
:erik:/var/www/html/modules/mydownloads/templates$


I suspect that my XOOPS installation suffers from decay, but unfortunately upgrading is not an option at this time...

Erik


Did you update the module afterwards?

7
Catzwolf
Re: Problem adding template file
  • 2004/7/30 13:37

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Ok you confused me here for a second, are these new templates for blocks or for a new page (ie like the index.php page)?

The both templates are handled slighly different by xoops

for blocks, you will have to add the template as thus:

$modversion['blocks'][1]['file'] = "mydownloads_top.php";
$modversion['blocks'][1]['name'] = _MI_MYDOWNLOADS_BNAME1;
$modversion['blocks'][1]['description'] = "Shows recently added donwload files";
$modversion['blocks'][1]['show_func'] = "b_mydownloads_top_show";
$modversion['blocks'][1]['edit_func'] = "b_mydownloads_top_edit";
$modversion['blocks'][1]['options'] = "date|10|19";
$modversion['blocks'][1]['template'] = 'mydownloads_block_new.html';


Compared to the other way for templateing different pages

$modversion['templates'][1]['file'] = 'mydownloads_brokenfile.html';
$modversion['templates'][1]['description'] = '';


So is this for a block then?

8
edooper
Re: Problem adding template file
  • 2004/7/30 13:39

  • edooper

  • Just popping in

  • Posts: 4

  • Since: 2003/6/5 1


Nope - you are da man. Now it works! Woohoo!

I didn't know I had to update the module, but it did the trick - thanks a million!


Erik

9
Catzwolf
Re: Problem adding template file
  • 2004/7/30 13:49

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Quote:

edooper wrote:
Nope - you are da man. Now it works! Woohoo!

I didn't know I had to update the module, but it did the trick - thanks a million!


Erik


Your ever so welcome

ATB

Catz

10
batdevis
Re: Problem adding template file
  • 2005/2/18 14:29

  • batdevis

  • Just popping in

  • Posts: 41

  • Since: 2002/8/16


I have the same problem and I don't understand the solution.

Quote:

slaserver:erik:/var/www/html/modules/mydownloads/templatesls
blocks
/                      [b]mydownloads_frontpage.html[/b]  mydownloads_recent.html      mydownloads_viewcat.html
index
.html                   mydownloads_index.html      mydownloads_singlefile.html
mydownloads_brokenfile
.html  mydownloads_modfile.html    mydownloads_submit.html
mydownloads_download
.html    mydownloads_ratefile.html   mydownloads_topten.html
slaserver
:erik:/var/www/html/modules/mydownloads/templates$



the file mydownloads_frontpage.html must be in block directory, isn't it?

bye

Devis_

Login

Who's Online

269 user(s) are online (164 user(s) are browsing Support Forums)


Members: 0


Guests: 269


more...

Donat-O-Meter

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

Latest GitHub Commits