Welcome to Geeklog, Anonymous Saturday, April 20 2024 @ 06:21 am EDT

Geeklog Forums

Opps! I've deleted the default Topic block


Status: offline

Filipino

Forum User
Chatty
Registered: 08/27/02
Posts: 50
I have accidentally deleted the default Topic block from 1.3.8 is there an easy way to get it back?

-Wayne-
 Quote

Status: offline

siridhar

Forum User
Newbie
Registered: 09/27/03
Posts: 8
curious
just curious...how did you delete the topic block? I am using 1.3.8-1 and there is only an option to display or hide it.
 Quote

Status: offline

Filipino

Forum User
Chatty
Registered: 08/27/02
Posts: 50
Just selected the [DELETE] option.


I had created a Topic-2 which had a customized menu something went wrong so I was going to delete the cutom one and redo - selected the wrong one.


I have three sites running 1.3.8 and all have Save and Delete. I am using a highly customised theme. From your comments I presume 'out of the box' GL does not allow this.


-Wayne-


ps just checked I have [SAVE] [CANCEL] [DELETE] on each gldefault block, have no standard themes online to check any difference.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The standard themes don't have a "delete" option for gldefault blocks.

To get the block back, use the following SQL request:

INSERT INTO gl_blocks (bid, name, type, title, tid, blockorder, content, rdfurl, rdfupdated, onleft, phpblockfn, group_id, owner_id, perm_owner, perm_group, perm_members, perm_anon) VALUES (3, 'section_block', 'gldefault', 'Topics', 'all', 0, '', '', '0000-00-00 00:00:00', 1, '', 1, 2, 3, 3, 2, 2);

You may need to replace "gl_blocks" with the actual name of your blocks table, in case you changed the prefix.

bye, Dirk
 Quote

Status: offline

Filipino

Forum User
Chatty
Registered: 08/27/02
Posts: 50
Many thanks Dirk - It was a theme downloaded from here as well Cry Not to worry will be more careful in the future - first time for everything. -Wayne-
 Quote

Status: offline

Filipino

Forum User
Chatty
Registered: 08/27/02
Posts: 50
Dirk ... the code throws up an error - Wayne-


Failed to execute SQL :


SQL INSERT INTO gl_blocks (bid, name, type, title, tid, blockorder, content, rdfurl, rdfupdated, onleft, phpblockfn, group_id, owner_id, perm_owner, perm_group, perm_members, perm_anon) VALUES (3, 'section_block', 'gldefault', 'Topics', 'all', 0, '', '', '0000-00-00 00:00:00', 1, '', 1, 2, 3, 3, 2, 2);


failed : Duplicate entry '3' for key 1
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Oops, sorry - that was a copy straight out of sql/mysqltableanddata.php, but of course the new block can't have the block id 3 again ...

Try INSERT INTO gl_blocks (name, type, title, tid, blockorder, content, rdfurl, rdfupdated, onleft, phpblockfn, group_id, owner_id, perm_owner, perm_group, perm_members, perm_anon) VALUES ('section_block', 'gldefault', 'Topics', 'all', 0, '', '', '0000-00-00 00:00:00', 1, '', 1, 2, 3, 3, 2, 2);

bye, Dirk
 Quote

Status: offline

Filipino

Forum User
Chatty
Registered: 08/27/02
Posts: 50
No problems Dirk won't delete you from the Christmas card list Big Grin

Many thanks Wayne

PS Late edit .... it worked.
 Quote

All times are EDT. The time is now 06:21 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content