This paper introduces a new agent-based model for information diffusion which considers the community structure of a social network as a source of extracting the judgement each individual has on another. The judgement value has notable impacts on opinion dynamics. Generalising the model, a solution to the influence maximisation problem is proposed in dynamic social networks where the network is seen as consecutive static snapshots. The solution defines a new framework in which the advertisement budget is divided among fixed-length campaigns; then, tries to maximise the desire of individuals towards the advertised idea by initiating new links to them. Targets of the links can be chosen based on an optimisation technique or some centrality-based heuristics. Our experiments show that in low-reciprocity scale-free networks, it is more effective to use a centrality measure. Also, it is more beneficial to choose a short campaign length in networks where a consensus is probable.