Author |
Message |
wrecit
Regular


Joined: Jan 27, 2008
Posts: 99
|
Posted:
Mon Jan 28, 2008 4:42 pm |
|
I want to create 2 new encylopedia moduals on my site (one can just replace the current one)
I need some of the visitor side text to be diffrent though. My initial thought is to just change the code where ever it says encylopedia_ to My new modual name_
I have done alot of reading and to be honest I am totaly confused and about the only thing I do understand is that I have to change code and sql
Making any mods to sql scares the heck out of me to be honest and I just know that if I try this I will kill my site.
Can someone give me real idiot proof directions? |
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Mon Jan 28, 2008 7:20 pm |
|
Changing the names might work, especially if you create the necessary database tables with the changed names, too. If that's all you do, it shouldn't affect the rest of your site - at most it would cause the new module not to display correctly due to a parsing error or not update the tables correctly if they aren't created correctly.
Just a question, though, could you use different encyclopedias in the existing module? You can create multiple encyclopedias. Would that work? |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
 |
Susann
Moderator

Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support
|
Posted:
Mon Jan 28, 2008 8:08 pm |
|
Should be possible I know it works for reviews.
I used only phpMyAdmin to duplicate and rename the tables of my second reviews modul. It will not kill your site but the problem could be for example when you donĀ“t change all links that you mix the entries of both modules. So backup, backup and backup  |
|
|
|
 |
wrecit

|
Posted:
Mon Jan 28, 2008 8:26 pm |
|
basicly Everything Encylopidia does is exactly what I need. my problem is I want to convert it to be racing site driver points display
When you bring up encylopedia the top says
Your site: Encylopedia
I want to change it to say
Your Site: Track Points (or just points)
Then in the actual encylopedia block it says
List of available Encyclopedias in Your Site:
I want to change this to say
List of available divisions in Your Site:
At the bottom of this block it says
You're Administrator: following is the list of Inactive Encyclopedias:
I want to change it to say
You're Administrator: following is the list of Inactive Divisions:
Then when you chose an encylopedia (renamed to division) you see the title and you chose alphabeticaly. Can this be changed so that you could have 1 button (say in place of (A)) say YTD Points or total points another button that will say weekly results. When you hit total points it will show a page with text that will display the information when you click on weekly it will list the dates.
does this make sence? |
|
|
|
 |
wrecit

|
Posted:
Mon Jan 28, 2008 8:27 pm |
|
just thought of somthing else that might work. Can I make some of the alphabet invisable? then I can just have the letters that are needed show up. |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Tue Jan 29, 2008 6:00 am |
|
wrecit, I have not tested this, but you can give it a try (make sure you keep a backup of your original file ):
=== OPEN FILE ===
modules/Encyclopedia/index.php
=== FIND ===
Within function alpha($eid), find this code here:
Code:
while (list(, $ltr) = each($alphabet)) {
$ltr = substr($ltr, 0, 1);
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_encyclopedia_text WHERE eid='$eid' AND UPPER(title) LIKE '$ltr%'"));
if ($numrows > 0) {
echo "<a href=\"modules.php?name=$module_name&op=terms&eid=$eid&ltr=$ltr\">$ltr</a>";
} else {
echo $ltr;
}
if ( $counter == round($num/2) ) {
echo " ]\n<br />\n[ ";
} elseif ( $counter != $num ) {
echo " | \n";
}
$counter++;
}
|
=== CHANGE TO ===
Code:
while (list(, $ltr) = each($alphabet)) {
$ltr = substr($ltr, 0, 1);
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_encyclopedia_text WHERE eid='$eid' AND UPPER(title) LIKE '$ltr%'"));
if ($numrows > 0) {
echo "<a href=\"modules.php?name=$module_name&op=terms&eid=$eid&ltr=$ltr\">$ltr</a>";
} else {
continue;
}
if ( $counter == round($num/2) ) {
echo " ]\n<br />\n[ ";
} elseif ( $counter != $num ) {
echo " | \n";
}
$counter++;
}
|
|
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
wrecit

|
Posted:
Tue Jan 29, 2008 4:18 pm |
|
Montego that will work!!!! I looked at he code you changed and for some reason I understand what it does lol.
Now to do the basic text changes and I have a "product" I can present.
Can someone give me a hint as to where the words
<B>Please select a letter from the following list to consult terms:</B>
are found in the encylopedia code? lol |
|
|
|
 |
Gremmie
Former Moderator in Good Standing

Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA
|
Posted:
Tue Jan 29, 2008 4:27 pm |
|
Look in modules/Encyclopedia/language/lang-english.php, assuming you are using English. |
_________________ Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module |
|
|
 |
wrecit

|
Posted:
Tue Jan 29, 2008 9:49 pm |
|
and this is why I am currently loading Raven to replace Platinum on my site that is schedualed to open in a week. Gremmie I was looking in the actual code for 4 hrs before seeing your sugestion and as you know I found everything that I want to edit and from the looks of it my text edits won't effect code.
I wish I had Raven and the Raven community 5 years ago. I might actualy know somthing now lol.
Thanks guys and gal's for all the help so far. Give me about a week and I will give you a peek at kart TV (my site) and I am planning on setting up a "shadow" site with the "racing package" that I will show off to you also. |
|
|
|
 |
|