Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Display Content Mod - Version 2
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 13

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 08 August 2001 :  10:36:52  Show Profile  Visit Rob Poretti's Homepage
Hi guys,

I have made changes to the first post in this forum topic, to try and clarify the creation of the MS ACCESS database for this mod. Could anyone that has succesfully set up an Access DB double check it to make sure it is correct and that I haven't missed anything? I'd certainly appreciate it!



Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 08 August 2001 :  16:39:40  Show Profile  Visit Rob Poretti's Homepage
quote:

quote:

Has anyone found the "Posting Restrictions Mod"?




I belive you can find it here:
http://63.219.181.102/forum/topic.asp?TOPIC_ID=6220&FORUM_ID=25&CAT_ID=17&Topic_Title=Forum Posting restrictions and hiding&Forum_Title=MOD Add%2DOn Forum %28W%2FCode%29

Jim Oswell



Thanks Jim for pointing this out. (I've corrected it in the first post and will change the instructions in the zip file as soon as I organize all the other changes.) The mod indirectly requires it because of hidden forums, etc.

I'm just curious if this has posed any problems with people trying to implement this mod?

Cheers,

Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 08 August 2001 :  16:55:29  Show Profile  Visit Rob Poretti's Homepage
quote:

 
'//////////////////////////////// FORM VARIABLES //////////////
if Request.Form("intID") = "" then
intID = 1
else
intID = cint(Request.Form.Item("intID"))
end if
'//////////////////////////////// DISPLAY COLUMN PROPERTIES //////////////


The above statements(at the top of contentdisplay_editor.asp) force the intID to be "1" when you load the contentdisplay_editor.asp. And if you have no record with ID "1" in the table DC_templates, you will get an error of Either Eof or BOF is true or record has been deleted. To overcome this problem these statements need to be added to this file:

Look for the following in contentdisplay_editor.asp

 
if not (oRSTemplates.EOF and oRSTemplates.BOF) then
DatabaseConnected = True
end if



And add these statements below it


 
'########### In case there is no record with ID=1 ########
if oRSTemplates.RecordCount > 0 then
if Request.Form("intID") = "" then
intID = oRSTemplates("ID")
'Make sure the working is set to True
oRSTemplates("WORKING") = True
oRSTemplates.Update
end if
end if
'#######################################################


Above will assign ID of first recordset returned by the query to the intID.


gauravbhabu

There is only one miracle...That is LIFE!



Hi folks,

Just been going over this...

The above modification should not be necessary if the Working field has a default to 1 (SQL Server) or True (MS Access). If the default is correctly set, then the code makes it impossible to have a record without a "working" template. I made sure of that...

Unless, I've missed something, I would suggest that the simpler approach is to leave the code unmodified and make sure that the database is set up properly. Having said that, the code is currently checking for a "1" as if the DB backend was SQL -- instead of MS ACCESS. (I'll get to this issue once I finish going over all of these other posts...)

Cheers!

Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 08 August 2001 :  17:16:59  Show Profile  Visit Rob Poretti's Homepage
quote:

quote:
I just can't wait to delve into this 1/2, Yes/No, True/False thing. It's given me grief before

LOL. Yep been there done that. Can't get this one right for some reason. But it does work with the setting I posted earlier so I am not sure what 'Working' really is supposed to do at this point.
simonduz


http://easyromantic.webbhost.net -[test site]-
yada, yada.



Sure...

The Working field maintains "state" for a current operating template. By default, whenever the editor is entered, it will load the "working" template. This way, if you leave the editor for any reason (for example, to edit the contents of a post), when you return, the correct template will load up. This is why you can only have ONE working template, and why the database should be set to default this field to "1" or "True" (depending of DB)...

Cheers,


Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960

Edited by - Rob Poretti on 08 August 2001 20:06:26
Go to Top of Page

simonduz
Junior Member

161 Posts

Posted - 09 August 2001 :  09:04:57  Show Profile  Visit simonduz's Homepage  Send simonduz an ICQ Message  Send simonduz a Yahoo! Message
Thanks for the update Rob I am trying it locally now before I put it in the HuwR ver3.3 portal code.



http://easyromantic.webbhost.net -[test site]-
http://www.mygahanna.com -[new project]-
yada, yada.
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 09 August 2001 :  09:16:24  Show Profile
quote:
Richard also mentions that "This has been added to v3.3 so the database field should already be there for those that are using
v3.3
". Thanks Richard!


I just wanted to followup on this. CAT_ORDER is still the same, but instead of using FORUM_ORDER, v3.3 is using F_ORDER.
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 09 August 2001 :  10:02:33  Show Profile  Visit Rob Poretti's Homepage
Thanks Richard for the update!

Anyone using this mod with 3.3 yet? (Even if this message gets old, please post a reply when you are attempting - have succesfully implemented this mod with 3.3.)

Cheers!

Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 09 August 2001 :  10:30:06  Show Profile  Visit Rob Poretti's Homepage
simonduz,

Did you get that right-hand spacing problem resolved? I too, have found that if the message is short, the table does not get sized to the proper width. I solved this by putting a width="100%" in the first table tag of the DisplayMode. For example:

<% case 7 ' //////////// 7 = Graphical: Same as Article but with images for links & table type layout. ////////////
counter = counter + 1 %>
<tr>
<td>
<table cellspacing="0" cellpadding="3" width="100%">
<tr>


This seems to have solved the problem in the editor, although I haven't tested this on a "real" page yet.



TheRat,

GauravBhabu had asked some further information about your problems -- any luck?



@tomic,

Could you refer me to where you are adding the urlpath parameter to the ChkString function so that the read more... link is properly sending the required information. I should really fix this asap. Thanks!


Thanks to all for helping out! I've checked a number of your websites out and they look great!


Cheers!



Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960

Edited by - Rob Poretti on 09 August 2001 10:31:11
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 09 August 2001 :  11:26:35  Show Profile  Visit Rob Poretti's Homepage
Hi folks,

I just found another small dependency for a mod with a couple of the new display modes -- DisplayMode 7 and 8 (and using the graphics bars) have a printer icon that accesses a print.asp page that creates a "printer friendly" page of the topic that you are refering to.

I cannot find the original mod any longer -- anyone help here?

If you want to use the newer Yet Another Printer Friendly Mod click on the link to find out what you need...

You must then change references from the older print.asp file to whatever is required for this newer mod. I'm considering implementing the newer version -- after I resolve some current issues AND if people are telling me that they are using this newer version.



Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 09 August 2001 :  15:45:30  Show Profile
quote:

[quote]
 
'//////////////////////////////// FORM VARIABLES //////////////
if Request.Form("intID") = "" then
intID = 1
else
intID = cint(Request.Form.Item("intID"))
end if
'//////////////////////////////// DISPLAY COLUMN PROPERTIES //////////////


The above statements(at the top of contentdisplay_editor.asp) force the intID to be "1" when you load the contentdisplay_editor.asp. And if you have no record with ID "1" in the table DC_templates, you will get an error of Either Eof or BOF is true or record has been deleted. To overcome this problem these statements need to be added to this file:

Look for the following in contentdisplay_editor.asp

 
if not (oRSTemplates.EOF and oRSTemplates.BOF) then
DatabaseConnected = True
end if



And add these statements below it


 
'########### In case there is no record with ID=1 ########
if oRSTemplates.RecordCount > 0 then
if Request.Form("intID") = "" then
intID = oRSTemplates("ID")
'Make sure the working is set to True
oRSTemplates("WORKING") = True
oRSTemplates.Update
end if
end if

'#######################################################


Above will assign ID of first recordset returned by the query to the intID.


gauravbhabu



Hi folks,

Just been going over this...

The above modification should not be necessary if the Working field has a default to 1 (SQL Server) or True (MS Access). If the default is correctly set, then the code makes it impossible to have a record without a "working" template. I made sure of that...

Unless, I've missed something.....




In the above modification suggested, I observed that if there is no record with ID=1 the addition of these statements is neccessary. Else A message saying Either you are at the end of ...or the record has been deleted. This is not due to Working but is related to ID

You may try to test this by deleting the record with ID=1 and see if the error is occuring.

Share A Square at forumSquare


gauravbhabu

There is only one miracle...That is LIFE!
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 09 August 2001 :  16:06:49  Show Profile
quote:

Hi folks,

I just found another small dependency for a mod with a couple of the new display modes -- DisplayMode 7 and 8 (and using the graphics bars) have a printer icon that accesses a print.asp page that creates a "printer friendly" page of the topic that you are refering to...





content.asp

Within the Sub WriteGraphicsBar

<a href="print.asp?TOPIC_ID=<%= rs("TOPIC_ID") %>">

The above line may be changed as follows:

<a href="JavaScript:openWindow5('pop_printer_friendly.asp?TOPIC_ID=<%= rs("TOPIC_ID") %>')">

Share A Square at forumSquare


gauravbhabu

There is only one miracle...That is LIFE!
Go to Top of Page

simonduz
Junior Member

161 Posts

Posted - 12 August 2001 :  10:30:16  Show Profile  Visit simonduz's Homepage  Send simonduz an ICQ Message  Send simonduz a Yahoo! Message
I don't know why I have problems with this.
Well I posted over in Huwr portal forum just to make sure that this was working on his mod forum code.
There were a couple of people including Huwr that had this Mod working in ver. 3.3 so I took a shot at it. I created the the table from scratch using your new instructions.
Error when creating a default template.
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/FORUM/contentdisplay_editor.asp, line 416
I checked the table and it is creating a template.
Can somebody help.
My install on SR4 is perfect.
simonduz


http://easyromantic.webbhost.net -[test site]-
http://www.mygahanna.com -[new project]-
yada, yada.
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 14 August 2001 :  21:21:06  Show Profile  Visit Rob Poretti's Homepage
Sorry folks,

I've been dealing with two viruses (including the Code Red worm) on my development server. As soon as I get things sorted out, I'll be back...



Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960
Go to Top of Page

simonduz
Junior Member

161 Posts

Posted - 15 August 2001 :  13:03:22  Show Profile  Visit simonduz's Homepage  Send simonduz an ICQ Message  Send simonduz a Yahoo! Message
I feel for ya.
I had a Code Red variant hit my server last weekend.
Good luck.
simoduz


http://easyromantic.webbhost.net -[test site]-
http://www.mygahanna.com -[new project]-
yada, yada.
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 17 August 2001 :  01:10:48  Show Profile  Visit Rob Poretti's Homepage
Ok folks... getting back to things...

GauravBhabu,

Now that I take a closer look, this code:
quote:


'########### In case there is no record with ID=1 ########
if oRSTemplates.RecordCount > 0 then
if Request.Form("intID") = "" then
intID = oRSTemplates("ID") 'Make sure the working is set to True
oRSTemplates("WORKING") = True
oRSTemplates.Update
end if
end if
'#######################################################



...only solves part of the problem -- but it doesn't solve it entirely. Plus, it causes some other problems -- namely the possibility of having more then one "Working" template. If the template that had ID=1 is deleted, then this code arbitrarily sets the first record in the recordset (because this code is postioned right after the recordset is created) as the "working" template. There might already be a "working" template that is somewhere else in the recordset -- now we have two "working" templates. There is no longer any guarantee that the correct working template will be loaded -- just the first one in the recordset.

A related problem to this mess, is that if one "edits" the content of a post (using Admin Mode), when the post_info.asp redirects to the editor, the querystring is maintained, so the page loads in UPDATE mode. The UPDATE mode loads form variables into constants that are sent as parameters to the content.asp page near the bottom of the contentdisplay_editor.asp page:

<% 'DisplayContent Parameters...
DisplayContent strContentType, strContentID, strTopicStatus, strDisplayMode, strDisplayOrder, strTopicCount, strMessageLength, strSubjectLength, strOrnament, strSpecial, strSafeMode, strForumStatus
%>

If the form fields are empty (which they will be in this circumstance), it causes an error in the content.asp page when the recordset is created.

Big oops...

I think I've solved the whole problem this evening, but I want to double check it in the morning when I'm more awake... I'm curious though... has any one been having errors when they are modifying content and the contentdisplay_editor.asp gets redirected from the post_info.asp page?

Cheers!





Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960
Go to Top of Page
Page: of 13 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07