Ive broken coppermine, but cant see how to fix it.... Ive broken coppermine, but cant see how to fix it....
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Ive broken coppermine, but cant see how to fix it....

Started by rowan, September 15, 2004, 08:50:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rowan

I was stripping out all of the table tags throughout the system so that we can integrate it with our new site, all seems to have gone well (its not finished yet mind) but after a few days of shouting, swearing and scratching my head i seem to be getting there. Well apart frmo this started occuring on the following pages

Warning: sprintf() [function.sprintf]: Too few arguments in /home/.../membergallery/include/functions.inc.php on line 211
(links removed but they are the correct home links)

My Album
Latest Comments
most viewed

All seem to be using the Thumbnails.php page which i havent touched, i even replaced it with a fresh copy yesterday but no luck.

It seems to be something to do with the {tabs} command but im not really sure what? I would replace my whole theme.php but ive stripped it totally of all of the tables etc. Im going to try to swap it with one from another theme to see if that works but other than that im stumped.

Just wondered if anyone else had managed to bugger it up like this or not?

Thanks

Rowan ???

Joachim Müller

making coppermine tableless is nearly impossible without completely recoding it from scratch - so far we only know of one install that is completely tableless (the person accomplished this will not share the code though). Without knowing what you actually changed, we can hardly advice anything. If you decided to try creating a tableless install, you will need a lot of know-how. There can be little to no support at all from us.

Joachim

rowan

I can gladly show you the code, or share it with you. I havent complteely stripped all of the tables out, just the ones for thumbnails, gallery images, gallery index, all the admin functions and uploads have tables in as i would need to re write some of the PHP to get that working and im not really a coder, more a designer who knows bits of PHP.

I can PM you details of how to see it if needs be, so you can see where the error is occuring etc. Im sure its just a simple bit of code that ive misplaced, something like a varibale not being passed to a function correctly.


rowan

this is where the error occurs, calling the {TABS} function i think..

[attachment deleted by admin]

Joachim Müller

what's your line 211 of code of the file include/functions.inc.php ?

Joachim

rowan

209         $maxTab = $CONFIG['max_tabs'];
210
211        $tabs = sprintf($template['left_text'], $items, $total_pages);
212        if (($total_pages == 1)) return $tabs;

Thanks...

Joachim Müller

One of the parameters appears to be empty, add a debug line like this one to find out:print '<span class="red">$template['left_text']:'.$template['left_text'].', $items:'.$items.', $total_pages:'.$total_pages.'</span>';, but this will only tell you what var is empty, you will not find out where you actually messed things up. If you feeld you can't cope with this issue on your own I suggest you leave the modification be - like I told you: this is not an easy one to accomplish.

Joachim

rowan

Ive spent over 4 days doing it now, IT WILL WORK!!!

Ive decided that it was too much hassle killing all of the templates, IE in admin functions so i have just modified your code in each script to get it to work

I take it i add that in functions.inc?

Thanks

R

rowan

Thanks for that, just got it working, it seems i was a little over eager with my code and changed 100%% to just 100% in the width of the

// Template used for tabbed display
$template_tab_display = array('left_text' => '<td width="100%%" align="left" valign="middle" class="tableh1_compact" style="white-space: nowrap">... etc

Thanks, an easy fix in the end!

Thought i was doing ok for not editing too much code...

:S