Author |
Topic  |
isuru
Junior Member
 
464 Posts |
Posted - 09 November 2000 : 21:17:35
|
Is there any way to mark topics that you've posted in when you log on?
A demo is on this forum (in vBulletin): http://www.hedgehogwheels.com/forums/
This would be a useful feature
-=-=-=-=-=-=-=- Isuru Amarasena
<font color=green>Moved from <b>Design Requests W/O Code</b> to <b>Design Requests W/Code</b> by <b>John</b></font id=green> |
|
phynias
New Member

USA
64 Posts |
Posted - 10 November 2000 : 12:37:54
|
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> Is there any way to mark topics that you've posted in when you log on?
A demo is on this forum (in vBulletin): http://www.hedgehogwheels.com/forums/
This would be a useful feature
-=-=-=-=-=-=-=- Isuru Amarasena <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote> Theres a couple things in that forum that ouwld be nice to add.. The next thread button is nice. I was thinking of doing that actually. I also like the add this thread to my favorites thing..
=P http://www.greeneggsnspam.com/newstrax/ |
 |
|
isuru
Junior Member
 
464 Posts |
Posted - 10 November 2000 : 12:53:48
|
phynais,
check this link out for info about bookmarking in asp:
http://www.asp-dev.com/forum/topic.asp?topic_id=2576&forum_id=16&Topic_Title=Cool Topic Bookmarks Feature&forum_title=ASP%2DDEv Forum Code Hacking&M=True&S=True
It is for the asp-dev forums (which snitz is based on)
You are an expert in ASP aren't you? <img src=icon_smile.gif border=0 align=middle> Maybe you can customize it to fit snitz?
-=-=-=-=-=-=-=- Isuru Amarasena |
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 10 November 2000 : 14:32:26
|
Here you go..
Link to bookmark.asp
You will need to add a new table <pre id=code><font face=courier size=2 id=code> < !--#INCLUDE FILE="config.asp" -- > my_conn= Server.CreateObject("ADODB.Connection") set rs = Server.CreateObject("ADODB.Recordset") my_Conn.Open strConnString on error resume next StrSql = "CREATE TABLE Bookmarks (Bookmark_ID COUNTER, " StrSql = StrSql & "B_MemberID REAL, B_TopicID REAL, " if strDBType = "access" then strSql = strSql & "BOOKMARK_ID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY )" else strSql = strSql & "BOOKMARK_ID int IDENTITY (1, 3) NOT NULL ) " end if set rs = my_conn.Execute (StrSql) set rs = nothing set my_conn = nothing rs.Close my_conn.Close </font id=code></pre id=code>
Add a link to the inc_top.asp: <pre id=code><font face=courier size=2 id=code> <a href="bookmark.asp" title="View a list of your bookmarks">your bookmarks</a> </font id=code></pre id=code> Now add a link to the topic.asp page somewhere : <pre id=code><font face=courier size=2 id=code> <a href="bookmark.asp?mode=add&id=<%=rs("Topic_ID")%>">Bookmark This Topic</a> </font id=code></pre id=code>
enjoy
<font color=blue>'Resistance is futile'</font id=blue>
Edited by - huwr on 18 February 2001 09:40:50 |
 |
|
isuru
Junior Member
 
464 Posts |
Posted - 10 November 2000 : 14:37:28
|
WOW Thanks so much HuwR!
That was so quick!
-=-=-=-=-=-=-=- Isuru Amarasena |
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 10 November 2000 : 15:02:32
|
View a demo here
<font color=blue>'Resistance is futile'</font id=blue> |
 |
|
freddie
Starting Member
1 Posts |
Posted - 12 November 2000 : 14:07:38
|
the "Add to Favorites" that phynias referenced does not add a url to your IE or Netscape favorites. I once had a link that did that but I removed it. What it does now is adds the thread to a favorites database and you can recall your favorite threads by clicking "favorites" on my menu. You can also create folders for storing threads.
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 13 November 2000 : 03:03:27
|
Adding to favorites. <pre id=code><font face=courier size=2 id=code> //configure the two variables below to match yoursite's own info var bookmarkurl="http://myforum.com" var bookmarktitle="My Snitz Forum"
function addbookmark(){ if (document.all) window.external.AddFavorite(bookmarkurl,bookmarktitle) }
</font id=code></pre id=code>
<font color=blue>'Resistance is futile'</font id=blue>
This probably won't work in netscape.
Edited by - huwr on 13 November 2000 03:04:25
Edited by - huwr on 18 February 2001 09:41:56 |
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 13 November 2000 : 03:06:01
|
Could someone move his topic to Dev Design Requests W/Code please
<font color=blue>'Resistance is futile'</font id=blue> |
 |
|
John
Junior Member
 
USA
427 Posts |
Posted - 13 November 2000 : 15:27:16
|
Moved <img src=icon_smile.gif border=0 align=middle>
<center><font size=2> <i>For I am not ashamed of the gospel, for it is the power of God for salvation to everyone who believes</i> <b>Romans 1:16</b> </font id=size2></center> |
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 14 November 2000 : 02:40:06
|
Hi HuwR, I'm in the process of testing some of the mods to see what i will include in the next forum I build and here's are my comments about this mod.
1) minor typos bugs in the table creation. -need to add set before the first my_conn -need to add "FORUM_" before bookmarks in the strSql. It might be better to use "strTablePrefix" variable instead of hardcoding "FORUM_" because some people might change it in their database and config.asp file, just for consistency's sake.
Here's my revised code: <pre id=code><font face=courier size=2 id=code> <!--#INCLUDE FILE="config.asp" --> <% 'Create New Bookmarks tableset set my_Conn = Server.CreateObject("ADODB.Connection") set rs = Server.CreateObject("ADODB.Recordset") my_conn.Open strconnstring on error resume next StrSql = "CREATE TABLE FORUM_Bookmarks (Bookmark_ID COUNTER, " StrSql = StrSql & "B_MemberID REAL, B_TopicID REAL, " StrSql = StrSql & "CONSTRAINT MyConstraint UNIQUE(Bookmark_ID))" set rs = my_conn.Execute (StrSql) set rs = nothing set my_conn = nothing rs.Close my_conn.Close Response.Write strSql %>
2) I added the "bookmark this topic" link next to "reply to topic" link on my test forum. I used the <%=Request.QueryString("TOPIC_ID")%> instead of the rs("topic_id") to avoid calling the recordset.
3) would be next if there's a little icon for it bookmarking similiar to "reply to topic" <img src=icon_smile.gif border=0 align=middle> I added asterisks(*) around the link in the meantime. [code]*<a href="bookmark.asp?mode=add&id=<%=Request.QueryString("TOPIC_ID")%>">Bookmark This Topic</a>*
3) Would be nice if bookmark.asp included the inc_top.asp and inc_footer.asp for consistent look and feel. I can add this myself but just wanted to let you or whoever that might add this functionality to the next release know. </font id=code></pre id=code> Cheers,
- Alan alan@calvsa.net www.calvsa.net
Edited by - huwr on 18 February 2001 09:43:27 |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 15 November 2000 : 18:30:52
|
Yep, got the same errors knight got and made the same changes. But I'm getting this error when clicking on the bookmark.asp link: <pre id=code><font face=courier size=2 id=code>Microsoft VBScript runtime error '800a000b' Division by zero /beta/31_sr2/bookmark.asp, line 111 </font id=code></pre id=code>
Line 111 is commented below: <pre id=code><font face=courier size=2 id=code>If rs("T_Replies") > ReplyPageNum Then ' More than X replies on the page and therefore must be more than one page Response.Write " - Jump to page: " Dim strRef, nCounter, nPages nPages = fix(rs("T_Replies") / ReplyPageNum) <font color=red>' Line 111</font id=red> If ( ( nPages * ReplyPageNum ) <> rs("T_Replies") ) Then nPages = nPages + 1 End If For nCounter = 1 to nPages strRef="<a href='topic.asp" strRef=strRef & "?whichpage=" & nCounter strRef=strRef & "&pagesize=" & ReplyPageNum strRef=strRef & "&id=" & rs("Topic_ID") strRef=strRef & "'>" & nCounter & "</a>" Response.Write strRef & " " Next End If</font id=code></pre id=code>
<center><font color=green>*----*----*----*----*----*----*----*----*----*----*----* <font size=2>"However, if you suffer as a Christian, do not be ashamed, but praise God that you bear that name."</font id=size2> 1 Peter 4:16</font id=green></center> |
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 15 November 2000 : 20:59:00
|
Yep, I discovered this one myself today, somewhere near the top of the page you need to set ReplyPageNum=<font color=red> (fisxed in download file)</font id=red> how many you want to display per page.
It does not include inc_top.asp because the code is called from inc_top.asp
I was under the impression that set rs = my_conn.Execute (StrSql) fetched the records form the database into an ado recordset and doing rs("field") fetched the data from the recordset and not the db.
<font color=blue>'Resistance is futile'</font id=blue>
Edited by - huwr on 15 November 2000 21:22:47 |
 |
|
Doug G
Support Moderator
    
USA
6493 Posts |
Posted - 15 November 2000 : 21:16:02
|
HuwR - as far as I know your impression is correct (I'd quote your comment but I'm trying to figure out how to use this Netscape from Linux). I'm sure there is some kind of cut & paste somewhere.
====== Doug G ====== |
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 15 November 2000 : 22:15:29
|
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I was under the impression that set rs = my_conn.Execute (StrSql) fetched the records form the database into an ado recordset and doing rs("field") fetched the data from the recordset and not the db. <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Huwr, you're absolutely right. What I meant to say was since the topic_id is available already in the querystring in topic.asp, Using request.querystring allows more flexibility on where I want to place the "add to bookmark" link.
Since I placed mines right between "reply to topic" and "send to friend" link, a recordset was not already opened there or available for me to use rs("topic_id").
Good work on this mode.
- Alan alan@calvsa.net www.calvsa.net
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 16 November 2000 : 03:33:49
|
That's cool, anybody like to come up with a nice icon ?
<font color=blue>'Resistance is futile'</font id=blue> |
 |
|
Topic  |
|