I am trying to shrink the width of the table on the single upload page and remove cell borders. I have accomplished it by adding the following CSS to style.css in the Water Drop theme:
form#cpgform table {
border-collapse: collapse;
width:50%;
}
However, I discovered when testing the site after this change that it has applied the css to other tables throughout the site, such as the one activated by the admin's config button. That sent me looking through upload.php to see what the HTML looked like. Around line 731 I found an instance of the function starttable which looks to be generating it:
// Open the form table.
starttable('100%', $upload_table_header, 2);
That function is defined around line 4047 of themes.inc.php:
// Function to start a 'standard' table
function starttable($width = '-1', $title = '', $title_colspan = '1', $zebra_class = '', $return = false)
By changing the value of $width in the above-mentioned instance in upload.php I am able to get the width where I want it. But from what I can see the function does not support inline CSS. So I can't apply border-collapse: collapse.
I did figure out that I can add a class to the single upload form by rewriting the function as follows:
// Open the form table.
starttable('100%', $upload_table_header, 2, 'uploadtest');
That then allows me to apply CSS to the single upload page with the following:
form#cpgform table.maintable.uploadtest {
border-collapse: collapse;
width:50%;
}
My question has two parts:
1) It looks like adding the class where I did is only applying it to the single upload page. Testing has so far supported that. But I don't know your system terribly well. Is that class being applied somewhere else that I don't see at the moment?
2) Is there a way to execute this change without altering the core file upload.php? I am not terribly familiar with how Coppermine themes work. Ideally it is best to change stuff like this inside the theme, and the installation I'm working on already has several core changes.