You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 79 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - need help modifying my theme [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
blake_ph
Nuke Soldier
Nuke Soldier


Joined: Aug 18, 2003
Posts: 11


PostPosted: Wed May 24, 2006 8:13 am Reply with quoteBack to top

hi everyone!

how i would modify my theme to look like something like this when user has submitted an article, instead of:

Code:
Anonymous writes


i want it to look like:

Code:
Submitted by Anonymous


here is my code:
Code:
/************************************************************/
/* Function themearticle()                                  */
/*                                                          */
/* This function format the stories on the story page, when */
/* you click on that "Read More..." link in the home        */
/************************************************************/

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
    global $admin, $sid, $tipath;
    $posted = ""._POSTEDON." $datetime "._BY." ";
    $posted .= get_author($aid);
    if ($notes != "") {
   $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
   $notes = "";
    }
    if ("$aid" == "$informant") {
   $content = "$thetext$notes\n";
    } else {
   if($informant != "") {
       $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
   } else {
       $content = "$anonymous ";
   }
   $content .= "<i>"._WRITES."</i><br><br> \"$thetext\"$notes\n";
    }
    $tmpl_file = "themes/MyTheme/story_page.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

thank you so much.
Find all posts by blake_phView user's profileSend private message
JJH221
Nuke Soldier
Nuke Soldier


Joined: May 30, 2005
Posts: 23


PostPosted: Mon May 29, 2006 12:01 am Reply with quoteBack to top

Administors preferences . You can change the name and also not allow anonymous users to post, im pretty sure.
Find all posts by JJH221View user's profileSend private message
spottedhog
Captain
Captain


Joined: Apr 30, 2004
Posts: 566


PostPosted: Mon May 29, 2006 2:56 am Reply with quoteBack to top

Code:
       $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
   } else {
       $content = "$anonymous ";
   }
   $content .= "<i>"._WRITES."</i><br><br> \"$thetext\"$notes\n";
    }


The first $content gets the news author name. After "else" the 2nd $content shows the word "Anonymous". The 3rd $content shows this:

"._WRITES." = shows what is in the language file with the corresponding name.
$thetext = shows the text of the news article
$notes = shows any notes the admin may have put.

To get "Submitted by Anonymous", you will need to change all of the 3 $contents. The code below would get your desired results:

Code:
       $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> &nbsp;<i>"._WRITES."</i><br><br> \"$thetext\"$notes\n";
   } else {
       $content = "Submitted by $anonymous <br><br> \"$thetext\"$notes\n";
   }
   }

_________________
SMF-Nuke admin

SMF and PHP Nuke integration is ready! Take a look at it by clicking on the link above.
Find all posts by spottedhogView user's profileSend private messageSend e-mailVisit poster's website
blake_ph
Nuke Soldier
Nuke Soldier


Joined: Aug 18, 2003
Posts: 11


PostPosted: Wed May 31, 2006 4:16 am Reply with quoteBack to top

thanks for the reply guys!

but i would like also to do the same for the registered users?

for example,
Code:
Username writes

into
Code:
Submitted by Username


thanks!
Find all posts by blake_phView user's profileSend private message
spottedhog
Captain
Captain


Joined: Apr 30, 2004
Posts: 566


PostPosted: Wed May 31, 2006 9:49 am Reply with quoteBack to top

Smile

Stretch your capabilities and try to make changes based upon what code I previously gave you. All the info you need is right there..... Take a chance and try to make it work.....

_________________
SMF-Nuke admin

SMF and PHP Nuke integration is ready! Take a look at it by clicking on the link above.
Find all posts by spottedhogView user's profileSend private messageSend e-mailVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.552 Seconds - 357 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::