News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

more than one post template?

Started by gameballa, October 16, 2009, 06:05:13 PM

Previous topic - Next topic

gameballa

i plan on updating the list with new games as they come out.
Online Videogame Competitions = Play 4 Free or 4 Cash @ GamerComp.com


"The only way you will ever have peace is if you no longer believe the lie is true"

gameballa

DUDE!! I figured it out by doing what you said before..

index.php

I added the arrya's example

'post360' => array('Post360.php', 'Post360'),


I then duplicated & renaimed these files. Post.php = Post360.php , Post.template.php = Post360.template.php , subs-Post.php = subs-Post360.php

I then just did a find replace in dreamweaver and replaced all Post to Post360 in those new files and everything works exactly how I WANTED IT TO!!! Thanks for putting me in the right direction :-D!!!
Online Videogame Competitions = Play 4 Free or 4 Cash @ GamerComp.com


"The only way you will ever have peace is if you no longer believe the lie is true"

Arantor

Just remember that if you have any mods that modify Post.php, Post.template.php or Subs-Post.php, you'll have to manually make the edits to the other files.

gameballa

Quote from: Arantor on October 17, 2009, 09:14:03 AM
Just remember that if you have any mods that modify Post.php, Post.template.php or Subs-Post.php, you'll have to manually make the edits to the other files.

humm i didnt think about that.. thanks for the heads up m8!!!!
Online Videogame Competitions = Play 4 Free or 4 Cash @ GamerComp.com


"The only way you will ever have peace is if you no longer believe the lie is true"

gameballa

hey Arantor I am having another issue now :-(.. When modifying a topic The post_prefix becomes part of the subject.. Example..

Post Prefix = 360: Game Title

Subject = 1v1 Challenge

When I go to edit the post the subject now becomes

Subject = Game Title - 1v1 Challenge

And the Post Prefix is now

Post Prefix = BLANK

I do not know how to fix this..

All I am doing now is putting a message next to the Post Prefix Drop down menu that says..

"Leave Game Title Blank When Modifying Post! If you need to change the game title make sure you change event type or else you will have the old game title listed as well!"

Online Videogame Competitions = Play 4 Free or 4 Cash @ GamerComp.com


"The only way you will ever have peace is if you no longer believe the lie is true"

Arantor

The only way around this is to store the post prefix in its own column in the messages table, and adjust Post.php, Post.template.php and Subs-Post.php (and the clones of each) to respectively: get the data from the user, display the data and save the data to the table.

gameballa

damn it so no easy fix! :-( Would you be able to show me the code I need to place on those 3 pages. I  know how to add it to the database I think.. But the exact code for the pages I am clueless..
Online Videogame Competitions = Play 4 Free or 4 Cash @ GamerComp.com


"The only way you will ever have peace is if you no longer believe the lie is true"

Arantor

Off hand I don't know the exact code, it is after all fairly complex.

Essentially the code in Post.php, Post2() function would be the place to go, looking at what it does with $_POST['subject'] and just using something similar yourself.

You'd also make an edit to Post.php, Post() to collect the value from the database for Post.template.php.

Lastly, Subs-Post.php, createPost and modifyPost, for adding/updating the value in the database.

gameballa

thanks I will see what I can figure out. you seem to put me in the right direction again.. Cheers!
Online Videogame Competitions = Play 4 Free or 4 Cash @ GamerComp.com


"The only way you will ever have peace is if you no longer believe the lie is true"

Advertisement: