Link back to FAQ entry in the user inferface after saving it

You have a suggestion for a future version of phpMyFAQ? Then post it here!

Moderator: Thorsten

Post Reply
bluesxman
Posts: 2
Joined: Wed Sep 26, 2007 12:57 pm

Link back to FAQ entry in the user inferface after saving it

Post by bluesxman » Tue May 20, 2008 3:57 pm

This was bugging the hell out of me, so I hacked record.save.php and record.add.php to provide a link back so you can quickly view the entry as a user sees in. Here's how it appears in record.save.php :

Code: Select all

print $PMF_LANG['ad_entry_savedsuc'];
    if ($record_id) {
        print $PMF_LANG['ad_entry_savedsuc'];
        // <bluesxman hack>
        print "<br /><br /><strong><i><a href=\"/FAQ/index.php?action=artikel&id=" . $record_id . "\">Click here to view the article you just saved</a></i></strong><br /><br />";
        // </bluesxman hack>
        link_ondemand_javascript($record_id, $record_lang);
    } else {
        print $PMF_LANG['ad_entry_savedfail'].$db->error();
    }
It's quick and dirty, but it gets the job done! I was also trying to figure out a way so that the link could have the title on the entry, but I'm not exactly proficient in PHP, so didn't try too hard.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest