Webmastersite.net
Register Log In


Not showing anything..

Comments on

zippo
Forum Regular

Usergroup: Customer
Joined: Jan 11, 2006

Total Topics: 48
Total Comments: 166
zippo
Posted Feb 19, 2006 - 4:17 PM:

I have a new TEXT field, {MY_FIELD}, using multiple checkboxes for it's values: One,Two,Three,Four,Five,Six

Shows and works fine from the edit and submit templates but I'm not having much luck getting anything to display in the displaylinks.tpl

..
{LINKTITLE}
</IF>
{LINKNEW} {LINKISUPDATED} {LINKADMIN}
<IF {LINKISREAD}><img src="templates/default/images/viewed.png"></IF>
<IF {LINKMY_FIELD} contains One><img src="templates/default/images/my_field_one.gif"></IF>
<IF {LINKMY_FIELD} contains Two><img src="templates/default/images/my_field_two.gif"></IF>
..


What am I missing?

Duh, I didn't add to regular links section.. shaking head

So.. now I'm a little further, except things blow up in function buffereval($code) with an error of "Parse error: syntax error, unexpected T_STRING in .."

Figure I'll try fiddling with the 'contains' directive and see what happens..
zippo
Forum Regular

Usergroup: Customer
Joined: Jan 11, 2006

Total Topics: 48
Total Comments: 166
zippo
Posted Feb 19, 2006 - 5:10 PM:

Debug output is normal it appears up to near the end and I am not certain what the warnings are or if they make any difference..

Consequently I removed all traces of MY_FIELD and recreated a new field of MYFIELD just to dodge any possibility of the underscore being a problem (before I realized that I hadn't stuffed the template in the regular links section)..
Setting cookie with name returnto, value example.com/index.php?actio...3/SUB-SUB-2/SUB-SUB-SUB-38 and duration 1140391369

Warning: Cannot modify header information - headers already sent by (output started at ../public_html/classes/database.php:276) in ../public_html/commonfuncs.php on line 441

Warning: Cannot modify header information - headers already sent by (output started at ../public_html/classes/database.php:276) in ../public_html/commonfuncs.php on line 445

Warning: Cannot modify header information - headers already sent by (output started at ../public_html/classes/database.php:276) in ../public_html/end.php on line 143


Load time so far: 0.54 seconds.
Performing query: SELECT id,memberid,location,time,ip,browser,starttime,catid,threadid,areaname,lastsearch,nopermission,inchat,name,isrobot,lastchat,groupnamestyle,acceptims,visibility FROM dtlinks_sessions WHERE time > 1140389569 AND (catid=226 AND memberid>0) ORDER BY time DESC LIMIT 0,100;

Number of rows is 0 for Resource id #65

Parse error: syntax error, unexpected T_STRING in ../public_html/commonfuncs.php(476) : eval()'d code on line 177


closing database connection
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 19, 2006 - 7:31 PM:

scripts.webmastersite.net/w...inks/wsnmanual/articles/65
As stated, you have bad template php/conditionals somewhere.
zippo
Forum Regular

Usergroup: Customer
Joined: Jan 11, 2006

Total Topics: 48
Total Comments: 166
zippo
Posted Feb 19, 2006 - 8:36 PM:

The only conditionals I have in this template are the

<IF {LINKMYFIELD} contains One><img=..></IF>

..for One - Six, removing them all is back to normal and an original template.
zippo
Forum Regular

Usergroup: Customer
Joined: Jan 11, 2006

Total Topics: 48
Total Comments: 166
zippo
Posted Feb 19, 2006 - 10:03 PM:

I looked into the php where the error msg is pointing to it seems that the warnings above may be related. Warning about a cookie and PHP code about a cookie.

I don't think this is a RTFM issue as what I am trying is from the manual and seems pretty cut and dry based on what I've read. I've tried quotes around the "One", "Two", etc also, no diff.

I have no clue about http headers, cookies and such but here is the lines from 3.6.6 that this error is pointing to.

index.php

174if ($custom == 'yes' && ($TID == 'promote' || strstr($TID, 'sponsor')))
175:{
176: if (!$thismember->id) $thismember->id = $_COOKIE['wsnuser'];
177: makecookie("sponsorusergroup", $thismember->id, time() + 100000);

commonfuncs.php

473:function buffereval($code)
474:{
475: ob_start();
476: eval($code);
zippo
Forum Regular

Usergroup: Customer
Joined: Jan 11, 2006

Total Topics: 48
Total Comments: 166
zippo
Posted Feb 19, 2006 - 10:51 PM:

Well, by screwing around something broke loose and started working.

My template additions are exactly the same, same locations, as above and the field and checkbox data value options are as it was with the error also.

I had the problems after steps like so:

1. add field
2. go to a link and edit using the new field, checking a few boxes, save
3. edit displaylinks.tpl to use the field
4. attempt to browse to the link through cat tree
5. error as above

Note: not sure if important yet, but I didn't select the first/left-most box above.

Experiment steps:

1. edit displaylinks.tpl, removed <IF..><img=..></IF> lines
2. edit link, turning off all checkboxes
3. paste <IF..><img=..></IF> lines back (same lines and location)
4. browse to link, no error
5. edit link, checked first/left-most box, save
6. browse back to link, no error

..seems fixed but there must still be an underlying bug which I will try and draw out again.

The first group/sequence of 5 steps I presume will present the problem again if I restore a site backup (to just before adding the new field) and go through the first group of steps again..

UPDATE
Spoke too soon, it's not that hard to break again.

Any one or combination of two works fine. Upon trying to check (or checking 3 right off the bat from none checked) a 3rd checkbox, save, error as in the thread above.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 26, 2006 - 3:46 AM:

I looked into the php where the error msg is pointing to it seems that the warnings above may be related. Warning about a cookie and PHP code about a cookie.

I don't think this is a RTFM issue


That part certainly is: scripts.webmastersite.net/w...nks/wsnmanual/articles/216

Will look into the rest.
zippo
Forum Regular

Usergroup: Customer
Joined: Jan 11, 2006

Total Topics: 48
Total Comments: 166
zippo
Posted Feb 28, 2006 - 11:51 AM:

Ah, didn't realize that about the header warnings being meaningless with debug mode on. The warnings about headers was only a secondary assumption of a problem on my part since they were unknown ground for me.

The T_STRING error is the point of failure, and as far as the manual pages referenced, I see nothing indicating the template additions were at fault. Although I'd surly be enlightend reading each and every page of the manual, I'll bet nothing in there would help unless there is a page saying I can only use 1 or 2 checkboxes per custom field. wink
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.