301
hsalazar
Re: How to "clone" Tiny Content
  • 2003/9/11 4:31

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


Philroy:

Sorry about the delay. Had lost track of this thread...

The procedure I outlined is all you need. I'll try to be more explicit here.

1) Replace every instance of "_TINYCONTENT_" with "_YOURMODULENAME_".
This means that for every appearance of _TINYCONTENT_ in the directory files, you should write _SPORTSDRAW_. I guess there's no problem here.

2) Replace every instance of "tinycontent" with "yourmodulename".
Same as above: every instance of "tinycontent" must be replaced by "sportsdraw". You won't find this difficult. And, Shine: the first lines of the file mysql.sql for the module read:
Quote:

#
# Table structure for table `tinycontent`
#

CREATE TABLE tinycontent (

This means that when doing the global replacement, now these lines will read:
Quote:

#
# Table structure for table `sportsdraw`
#

CREATE TABLE sportsdraw (

Which is necessary for XOOPS to separate the contents.

3) Replace every instance of "_TC_" with "_YOURMODULENAME_".
This means the same as in the above points: every instance of _TC_ must read _SPORTSDRAW_.


4) Change the names of three files:
-- blocks/tc_navigation.php
-- templates/tinycontent_index.html
-- templates/blocks/tinycontent_navigation_block.html


In this case the new files will be called:
-- blocks/sportsdraw_navigation.php
-- templates/sportsdraw_index.html
-- templates/blocks/sportsdraw_navigation_block.html

5) Replace the necessary language constants in the language files

This means that, for instance, in language/english/admin.php you have:

define("_TC_ADMINTITLE","Tiny Content");

and should have

define("_SPORTSDRAW_ADMINTITLE","Sports Draw");

Also, in language/english/modinfo.php you should replace the lines...

define("_MI_TINYCONTENT_NAME","Tiny Content");
define("_MI_TC_BNAME1","Tiny Content Menu");


for

define("_MI_SPORTSDRAW_NAME","Sports Draw");
define("_MI_SPORTSDRAW_BNAME1","Sports Draw Menu");


Please notice that the first part of the declarations was already changed by the global replacement. What you need to change here are the content strings, the right side of every definition.

6) And most important, open xoops_version.php and replace the two instances of "_MI_DIR_NAME" for "_MI_MODULENAME_DIR_NAME". In fact, also make this replacement directory wide.

This means exactly what it says. Every instance of _MI_DIR_NAME should end up saying _MI_SPORTSDRAW_DIR_NAME.
You need to make this replacement in the files index.php, xoops_version.php (two instances here, one pointing to the table name and the other to the directory name), admin/admin_header.php, admin/index.php, and in every modinfo.php file within the language directories.

I'll add these comments:

a) You also need to edit the logo file, so you can separate your module from the original Tiny Content in the admin section.

b) If XOOPS gets confused is because of the DIR variable mentioned in point [6]. That's why it's so important to do the replacement correctly. XOOPS should know for sure that module A is installed in directory A and has a database table A, while module B is installed in directory B and has a database B. If you don't make the replacements correctly, you'll confuse XOOPS.

All this sounds complex because I wanted to be thorough, but in fact, once you do it a couple of times you'll see it's really simple.

Again, if you still have any problems, please post them here to make the necessary corrections.

Cheers.



302
hsalazar
How to "clone" Tiny Content
  • 2003/9/1 14:39

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


@ Philroy:

Cloning Tiny Content it's not hard at all. What you have to do is a lot of replacements:

1) Replace every instance of "_TINYCONTENT_" with "_YOURMODULENAME_".

2) Replace every instance of "tinycontent" with "yourmodulename".

3) Replave every instance of "_TC_" with "_YOURMODULENAME_".

4) Change the names of three files:
-- blocks/tc_navigation.php
-- templates/tinycontent_index.html
-- templates/blocks/tinycontent_navigation_block.html

to

-- blocks/yourmodulename_navigation.php
-- templates/yourmodulename_index.html
-- templates/blocks/yourmodulename_navigation_block.html

5) Replace the necessary language constants in the language files

6) And most important, open xoops_version.php and replace the two instances of "_MI_DIR_NAME" for "_MI_MODULENAME_DIR_NAME". In fact, also make this replacement directory wide.

7) Also very important: do whatever changes you need, but please leave Chapi's credits in their place. It's his work and won't cost you anything to have this credits there.

I think that's all. If you have any problems, please post them here to make the necessary corrections.

Cheers.



303
hsalazar
How to "clone" Tiny Content
  • 2003/9/1 14:38

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


@ Philroy:

Cloning Tiny Content it's not hard at all. What you have to do is a lot of replacements:

1) Replace every instance of "_TINYCONTENT_" with "_YOURMODULENAME_".

2) Replace every instance of "tinycontent" with "yourmodulename".

3) Replave every instance of "_TC_" with "_YOURMODULENAME_".

4) Change the names of three files:
-- blocks/tc_navigation.php
-- templates/tinycontent_index.html
-- templates/blocks/tinycontent_navigation_block.html

to

-- blocks/yourmodulename_navigation.php
-- templates/yourmodulename_index.html
-- templates/blocks/yourmodulename_navigation_block.html

5) Replace the necessary language constants in the language files

6) And most important, open xoops_version.php and replace the two instances of "_MI_DIR_NAME" for "_MI_MODULENAME_DIR_NAME".

7) Also very important: do whatever changes you need, but please leave Chapi's credits in their place. It's his work and won't cost you anything to have this credits there.

I think that's all. If you have any problems, please post them here to make the necessary corrections.

Cheers.



304
hsalazar
Re: What's a block? (versus a 'section')
  • 2003/8/30 4:56

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


Phil:

Here's some answers.

1) You seem to have three content sections, each with several pages. I'd make three clones of Tiny Content and name them "About PNINS", "Events" and "Teams". Then I'd feed the content using Tiny Content's editor, in order to build the navigation block. An at the end, I'd put the three navigation blocks together to form the complete left menu. This way, you'll be able to edit every page using Tiny Content's built-in editor.

2) The breadcrumb's not so easy. I've looked at some scripts so far without luck. The most promising one can be found in the snippets of XMDT, but has no decent instructions so I haven't been able to make it work. Sorry about this.

3) The one news item calles "Important news" can be deployed using the module Spotlight. The new version was just uploaded to the CVS yesterday, and it'll let you do this: select a story to spotlight or let the system pick the latest one, as you wish. Then, this spotlighted story will include the headline and the intro text. Optionally you can include a picture. You can also add more links to other news, et cetera. What you need is a "minimalistic" Spotlight module: just one story, just one text.

I hope this is useful.

Cheers.



305
hsalazar
Re: SOLVED - Making Xoops CONTENT Multilingual *Fixed Code Quote problem*
  • 2003/8/14 18:15

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


einherjer:

One thing at a time. Here's what you need to do to successfully hack the options in a select box.

1) First, go to your database and in the table xoops_topics change the field topic_title from varchar(50) to varchar(255). This is so you have ample space to write the topic name in the database.

2) Open your file admin/index.php and look for the function modTopic() around line 226. Look for the place where the input text box is defined and instead of having 20 and 40 as the values for size and maxlength, set them to 40 and 250, so the page lets you write enough characters.

3) The function you mention is not the place to change site-wide the select boxes. For that, open your file class/xoopstree.php and look for function makeMySelBox(...). There, just before the line:

echo "<option value='$catid'$sel>$name</option>\n";

add a line saying:

$name $myts->makeTboxData4Show($name);


This has the effect of passing the variable $name through the sanitizer, and since this is hacked, it will display the correct string in your site's select boxes.

I think that should do it. Hope it helps.

Cheers.



306
hsalazar
Re: Xoops Chat, funny link titles
  • 2003/8/12 17:30

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


Hostile:

Since the site's templates are stored in the database and then cached, try accessing your site via FTP and then deleting all the files in the templates_c folder. Please notice the _c part, as this points to the cached files folder.



307
hsalazar
Re: Xoops Chat, funny link titles
  • 2003/8/12 15:36

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


Hostile:

In the file constants.php within the language directory, you need to change all the underscores that go after "_MI_XOOPSCHAT" for double underscores, for that's the way it's coded in the module...

Either that, or change the code in the module so instead of double underscores you have single underscores when calling the language constants.

Cheers.



308
hsalazar
Re: Override default table setting in style.css file
  • 2003/8/6 0:14

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


VI_Knight:

Here's what I think might be happening:

Your custom table has style declarations but no id settings. What styles will every TD use? It depends on the location of the table.

Let me be more specific. In the default theme.html, all the center content is within a TD, but it's not any TD: it's a TD with an id="centercolumn", and this means that in the absence of specific declarations, every TD inside it will inherit the one declared as td#centercolumn in the stylesheet.

That's why the different blocks in the theme have their own ids: you might define all of them different, if so you wanted. As it is, most of them have the same styles applied.

The logic within theme.html is easy to follow. Inside the TD with id="centercolumn" there's a table holding all the content in this way:

TD with id=centercolumn
--TABLE
----TR <== This is the first line
------TD with id=centerCcolumn, 2 cols wide
------ Content: blocks defined as center center
------/TD
----/TR

----TR <==This is the second line
------TD with id=centerLcolumn, 1 column wide
------ Content: blocks defined as center left
------/TD
------TD with id=centerRcolumn, 1 column wide
------ Content: blocks defined as center right
------/TD
----/TR
--/TABLE

--DIV with id=content
---- Content: the start page module's main content
--/DIV
etc.

The point to consider here is that every TD has an id, so you can style them as you wish. If you want a table with a different style,perhaps you should define your selectors accordingly.

Let's assume you want a table called custom. Call it with a declaration that includes id="custom" and in the stylesheet make a selector like table.custom { whaterver }. Do the same for the columns of the table: i.e., call them using < td id="customtd1"...>... and make selector like td.customtd1 { ... }...

Another advantage of doing this is the possibility of leaving out of the HTML all the styling code. Put it in the stylesheet, and this will your HTML maintenance mucho more easy.

I think this should work. Please help us posted.

Cheers.



309
hsalazar
Re: Override default table setting in style.css file
  • 2003/8/5 2:51

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


VI_Knight:

Where exactly are you putting the settings in the table tags? In principle, the order in which things get displayed should be the same as in pure HTML: first the style declarations within the code, then the style declarations in the head of the HTML file, then the stylesheet.

Sometimes your changes don't get applied because you still have old values in the cached folder (templates_c), or because you change a physical template but don't do the same with the one in the database.

In other words, please be a little more specific so we can elaborate a good answer.

Cheers.



310
hsalazar
Re: New Hosting Provider Wanted
  • 2003/8/4 18:22

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


ronhab:

Take a look at iPowerWeb. Though my sites are small, I haven't had problems with them, and very, very seldom their service fails. Also they respond quickly to questions. And at the price they offer, it's a bargain.

Cheers.





TopTop
« 1 ... 28 29 30 (31) 32 33 34 »



Login

Who's Online

235 user(s) are online (136 user(s) are browsing Support Forums)


Members: 0


Guests: 235


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