Welcome to Geeklog, Anonymous Wednesday, January 08 2025 @ 10:47 pm EST

Geeklog Forums

Signatures?


Buy My Pie

Anonymous
I was just wondering if there's any way to add a signature to my story postings? The signature set in the Account Information only works for comments. What can I do?
 Quote

Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
Well it looks like $sig is appended to the output... let me run a test to see if it's loaded in realtime or at the time of posting...
www.antisource.com
 Quote

Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
Okay great, the sig changes for all of my posts after I change it. Now to find the hack...
www.antisource.com
 Quote

Buy My Pie

Anonymous
Okay... well I'll be watching the thread.
 Quote

Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
In my lib-common.php, I added this to my Story Functions section:

Text Formatted Code
    // Get signature
    $author_sig = '';
    $author_iud = $A['uid'];
    if ( $author_iud > 1) {
        $author_sig = DB_getItem($_TABLES['users'],'sig', "uid = '$author_iud'");
    }
    if (!empty ($author_sig)) {
        $article->set_var( 'author_sig', $author_sig );
    }

 


Which needs to be anywhere before:

Text Formatted Code
   return $article->finish( $article->get_var( 'finalstory' ));
 


And then in my layout files I used {author_sig} to see if it would parse out.

I just now edited my post because I said it didn't work, but when I went to remove {author_sig}, I accidentally typed in {author_tag}, so I gave it another try and it worked. Very Happy
www.antisource.com
 Quote

Buy My Pie

Anonymous
Fatal error: Call to a member function on a non-object in /home/ethanme/public_html/main/lib-common.php on line 379
 Quote

Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
Okay go to antisource.com/lib-common.txt - and search for "Get signature" and see where I have it. Btw, I'm running 1.3.9 so hopefully an older or newer version won't conflict with this hack...
www.antisource.com
 Quote

Buy My Pie

Anonymous
Warning: main(/home/antisour/public_html/config.php): failed to open stream: No such file or directory in /home/ethanme/public_html/main/lib-common.php on line 72

Fatal error: main(): Failed opening required '/home/antisour/public_html/config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ethanme/public_html/main/lib-common.php on line 72
 Quote

Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
Quote by Buy My Pie: Warning: main(/home/antisour/public_html/config.php): failed to open stream: No such file or directory in /home/ethanme/public_html/main/lib-common.php on line 72

Fatal error: main(): Failed opening required '/home/antisour/public_html/config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ethanme/public_html/main/lib-common.php on line 72


No you can't use my lib-common.php, it's set for my host plus I have custom code in there, and it might not be compatible with your version of geeklog. Just look at the text file so you can see where my code example is at - search for "Get signature", and that block of code is what you need. It needs to be pasted somewhere into your Story Functions section (also search for that term), but before the last line of the section.
www.antisource.com
 Quote

Buy My Pie

Anonymous
Now I'm getting this error:

Warning: main(/path/to/geeklog/config.php): failed to open stream: No such file or directory in /home/ethanme/public_html/main/lib-common.php on line 70

Fatal error: main(): Failed opening required '/path/to/geeklog/config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ethanme/public_html/main/lib-common.php on line 70


And I even tried removing the new code, but it didn't help. I should just learn to leave things alone. Any idea how to fix this?
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
the error here is obvious..

notice the path quoted in the error: "path/to/geeklog/config.php"
clearly you have not set the proper path in lib-common.php for your config file, or you have changed it unwittingly. that path must point to the actual path to your config.php file.

hope that helps
 Quote

Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
Going forward, I would suggest backing up a copy of the file you are changing in case something goes wrong - just the other day I did the exact same thing to my config file - closed my ftp program before it finished uploading the changed file so then my site had a truncated config file which killed it. Without my backup I would have been in big trouble. Embarassed

Like machinari said, you just need to correct the path in the lib-common.php. It's going to be the path to your site on the server, usually what it looks like when in ftp. So for you it might be "home/buymypie/public_html/config.php" (just an example!).

www.antisource.com
 Quote

All times are EST. The time is now 10:47 pm.

  • 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